mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-5da07b0b46145344/out/
paparazzi.rs

1#![doc = "MAVLink paparazzi dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::{bitflags, Flags};
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748}
1749impl MavCmd {
1750    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1751}
1752impl Default for MavCmd {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[cfg_attr(feature = "ts", derive(TS))]
1758#[cfg_attr(feature = "ts", ts(export))]
1759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1761#[cfg_attr(feature = "serde", serde(tag = "type"))]
1762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1763#[repr(u32)]
1764#[doc = "Possible actions an aircraft can take to avoid a collision."]
1765pub enum MavCollisionAction {
1766    #[doc = "Ignore any potential collisions"]
1767    MAV_COLLISION_ACTION_NONE = 0,
1768    #[doc = "Report potential collision"]
1769    MAV_COLLISION_ACTION_REPORT = 1,
1770    #[doc = "Ascend or Descend to avoid threat"]
1771    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1772    #[doc = "Move horizontally to avoid threat"]
1773    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1774    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1775    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1776    #[doc = "Aircraft to fly directly back to its launch point"]
1777    MAV_COLLISION_ACTION_RTL = 5,
1778    #[doc = "Aircraft to stop in place"]
1779    MAV_COLLISION_ACTION_HOVER = 6,
1780}
1781impl MavCollisionAction {
1782    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1783}
1784impl Default for MavCollisionAction {
1785    fn default() -> Self {
1786        Self::DEFAULT
1787    }
1788}
1789#[cfg_attr(feature = "ts", derive(TS))]
1790#[cfg_attr(feature = "ts", ts(export))]
1791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1793#[cfg_attr(feature = "serde", serde(tag = "type"))]
1794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1795#[repr(u32)]
1796#[doc = "Source of information about this collision."]
1797pub enum MavCollisionSrc {
1798    #[doc = "ID field references ADSB_VEHICLE packets"]
1799    MAV_COLLISION_SRC_ADSB = 0,
1800    #[doc = "ID field references MAVLink SRC ID"]
1801    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1802}
1803impl MavCollisionSrc {
1804    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1805}
1806impl Default for MavCollisionSrc {
1807    fn default() -> Self {
1808        Self::DEFAULT
1809    }
1810}
1811#[cfg_attr(feature = "ts", derive(TS))]
1812#[cfg_attr(feature = "ts", ts(export))]
1813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1815#[cfg_attr(feature = "serde", serde(tag = "type"))]
1816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1817#[repr(u32)]
1818#[doc = "Aircraft-rated danger from this threat."]
1819pub enum MavCollisionThreatLevel {
1820    #[doc = "Not a threat"]
1821    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1822    #[doc = "Craft is mildly concerned about this threat"]
1823    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1824    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1825    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1826}
1827impl MavCollisionThreatLevel {
1828    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1829}
1830impl Default for MavCollisionThreatLevel {
1831    fn default() -> Self {
1832        Self::DEFAULT
1833    }
1834}
1835#[cfg_attr(feature = "ts", derive(TS))]
1836#[cfg_attr(feature = "ts", ts(export))]
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1843pub enum MavComponent {
1844    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1845    MAV_COMP_ID_ALL = 0,
1846    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1847    MAV_COMP_ID_AUTOPILOT1 = 1,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER1 = 25,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER2 = 26,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER3 = 27,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER4 = 28,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER5 = 29,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER6 = 30,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER7 = 31,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER8 = 32,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER9 = 33,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER10 = 34,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER11 = 35,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER12 = 36,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER13 = 37,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER14 = 38,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER15 = 39,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER16 = 40,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER17 = 41,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER18 = 42,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER19 = 43,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER20 = 44,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER21 = 45,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER22 = 46,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER23 = 47,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER24 = 48,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER25 = 49,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER26 = 50,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER27 = 51,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER28 = 52,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER29 = 53,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER30 = 54,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER31 = 55,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER32 = 56,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER33 = 57,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER34 = 58,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER35 = 59,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER36 = 60,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER37 = 61,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER38 = 62,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER39 = 63,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER40 = 64,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER41 = 65,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER42 = 66,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER43 = 67,
1934    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1935    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER45 = 69,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER46 = 70,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER47 = 71,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER48 = 72,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER49 = 73,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER50 = 74,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER51 = 75,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER52 = 76,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER53 = 77,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER54 = 78,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER55 = 79,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER56 = 80,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER57 = 81,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER58 = 82,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER59 = 83,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER60 = 84,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER61 = 85,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER62 = 86,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER63 = 87,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER64 = 88,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER65 = 89,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER66 = 90,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER67 = 91,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER68 = 92,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER69 = 93,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER70 = 94,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER71 = 95,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER72 = 96,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER73 = 97,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER74 = 98,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER75 = 99,
1998    #[doc = "Camera #1."]
1999    MAV_COMP_ID_CAMERA = 100,
2000    #[doc = "Camera #2."]
2001    MAV_COMP_ID_CAMERA2 = 101,
2002    #[doc = "Camera #3."]
2003    MAV_COMP_ID_CAMERA3 = 102,
2004    #[doc = "Camera #4."]
2005    MAV_COMP_ID_CAMERA4 = 103,
2006    #[doc = "Camera #5."]
2007    MAV_COMP_ID_CAMERA5 = 104,
2008    #[doc = "Camera #6."]
2009    MAV_COMP_ID_CAMERA6 = 105,
2010    #[doc = "Servo #1."]
2011    MAV_COMP_ID_SERVO1 = 140,
2012    #[doc = "Servo #2."]
2013    MAV_COMP_ID_SERVO2 = 141,
2014    #[doc = "Servo #3."]
2015    MAV_COMP_ID_SERVO3 = 142,
2016    #[doc = "Servo #4."]
2017    MAV_COMP_ID_SERVO4 = 143,
2018    #[doc = "Servo #5."]
2019    MAV_COMP_ID_SERVO5 = 144,
2020    #[doc = "Servo #6."]
2021    MAV_COMP_ID_SERVO6 = 145,
2022    #[doc = "Servo #7."]
2023    MAV_COMP_ID_SERVO7 = 146,
2024    #[doc = "Servo #8."]
2025    MAV_COMP_ID_SERVO8 = 147,
2026    #[doc = "Servo #9."]
2027    MAV_COMP_ID_SERVO9 = 148,
2028    #[doc = "Servo #10."]
2029    MAV_COMP_ID_SERVO10 = 149,
2030    #[doc = "Servo #11."]
2031    MAV_COMP_ID_SERVO11 = 150,
2032    #[doc = "Servo #12."]
2033    MAV_COMP_ID_SERVO12 = 151,
2034    #[doc = "Servo #13."]
2035    MAV_COMP_ID_SERVO13 = 152,
2036    #[doc = "Servo #14."]
2037    MAV_COMP_ID_SERVO14 = 153,
2038    #[doc = "Gimbal #1."]
2039    MAV_COMP_ID_GIMBAL = 154,
2040    #[doc = "Logging component."]
2041    MAV_COMP_ID_LOG = 155,
2042    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2043    MAV_COMP_ID_ADSB = 156,
2044    #[doc = "On Screen Display (OSD) devices for video links."]
2045    MAV_COMP_ID_OSD = 157,
2046    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2047    MAV_COMP_ID_PERIPHERAL = 158,
2048    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2049    #[doc = "Gimbal ID for QX1."]
2050    MAV_COMP_ID_QX1_GIMBAL = 159,
2051    #[doc = "FLARM collision alert component."]
2052    MAV_COMP_ID_FLARM = 160,
2053    #[doc = "Parachute component."]
2054    MAV_COMP_ID_PARACHUTE = 161,
2055    #[doc = "Winch component."]
2056    MAV_COMP_ID_WINCH = 169,
2057    #[doc = "Gimbal #2."]
2058    MAV_COMP_ID_GIMBAL2 = 171,
2059    #[doc = "Gimbal #3."]
2060    MAV_COMP_ID_GIMBAL3 = 172,
2061    #[doc = "Gimbal #4"]
2062    MAV_COMP_ID_GIMBAL4 = 173,
2063    #[doc = "Gimbal #5."]
2064    MAV_COMP_ID_GIMBAL5 = 174,
2065    #[doc = "Gimbal #6."]
2066    MAV_COMP_ID_GIMBAL6 = 175,
2067    #[doc = "Battery #1."]
2068    MAV_COMP_ID_BATTERY = 180,
2069    #[doc = "Battery #2."]
2070    MAV_COMP_ID_BATTERY2 = 181,
2071    #[doc = "CAN over MAVLink client."]
2072    MAV_COMP_ID_MAVCAN = 189,
2073    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2074    MAV_COMP_ID_MISSIONPLANNER = 190,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2083    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2084    MAV_COMP_ID_PATHPLANNER = 195,
2085    #[doc = "Component that plans a collision free path between two points."]
2086    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2087    #[doc = "Component that provides position estimates using VIO techniques."]
2088    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2089    #[doc = "Component that manages pairing of vehicle and GCS."]
2090    MAV_COMP_ID_PAIRING_MANAGER = 198,
2091    #[doc = "Inertial Measurement Unit (IMU) #1."]
2092    MAV_COMP_ID_IMU = 200,
2093    #[doc = "Inertial Measurement Unit (IMU) #2."]
2094    MAV_COMP_ID_IMU_2 = 201,
2095    #[doc = "Inertial Measurement Unit (IMU) #3."]
2096    MAV_COMP_ID_IMU_3 = 202,
2097    #[doc = "GPS #1."]
2098    MAV_COMP_ID_GPS = 220,
2099    #[doc = "GPS #2."]
2100    MAV_COMP_ID_GPS2 = 221,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_1 = 236,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_2 = 237,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_3 = 238,
2107    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2108    MAV_COMP_ID_UDP_BRIDGE = 240,
2109    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2110    MAV_COMP_ID_UART_BRIDGE = 241,
2111    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2112    MAV_COMP_ID_TUNNEL_NODE = 242,
2113    #[doc = "Illuminator"]
2114    MAV_COMP_ID_ILLUMINATOR = 243,
2115    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2116    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2117    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2118}
2119impl MavComponent {
2120    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2121}
2122impl Default for MavComponent {
2123    fn default() -> Self {
2124        Self::DEFAULT
2125    }
2126}
2127#[cfg_attr(feature = "ts", derive(TS))]
2128#[cfg_attr(feature = "ts", ts(export))]
2129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2131#[cfg_attr(feature = "serde", serde(tag = "type"))]
2132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2133#[repr(u32)]
2134#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2135#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2136pub enum MavDataStream {
2137    #[doc = "Enable all data streams"]
2138    MAV_DATA_STREAM_ALL = 0,
2139    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2140    MAV_DATA_STREAM_RAW_SENSORS = 1,
2141    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2142    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2143    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2144    MAV_DATA_STREAM_RC_CHANNELS = 3,
2145    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2146    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2147    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2148    MAV_DATA_STREAM_POSITION = 6,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA1 = 10,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA2 = 11,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA3 = 12,
2155}
2156impl MavDataStream {
2157    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2158}
2159impl Default for MavDataStream {
2160    fn default() -> Self {
2161        Self::DEFAULT
2162    }
2163}
2164#[cfg_attr(feature = "ts", derive(TS))]
2165#[cfg_attr(feature = "ts", ts(export))]
2166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2168#[cfg_attr(feature = "serde", serde(tag = "type"))]
2169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2170#[repr(u32)]
2171#[doc = "Enumeration of distance sensor types"]
2172pub enum MavDistanceSensor {
2173    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2174    MAV_DISTANCE_SENSOR_LASER = 0,
2175    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2176    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2177    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2178    MAV_DISTANCE_SENSOR_INFRARED = 2,
2179    #[doc = "Radar type, e.g. uLanding units"]
2180    MAV_DISTANCE_SENSOR_RADAR = 3,
2181    #[doc = "Broken or unknown type, e.g. analog units"]
2182    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2183}
2184impl MavDistanceSensor {
2185    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2186}
2187impl Default for MavDistanceSensor {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[cfg_attr(feature = "ts", derive(TS))]
2193#[cfg_attr(feature = "ts", ts(export))]
2194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "serde", serde(tag = "type"))]
2197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2198#[repr(u32)]
2199#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2200pub enum MavDoRepositionFlags {
2201    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2202    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2203}
2204impl MavDoRepositionFlags {
2205    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2206}
2207impl Default for MavDoRepositionFlags {
2208    fn default() -> Self {
2209        Self::DEFAULT
2210    }
2211}
2212#[cfg_attr(feature = "ts", derive(TS))]
2213#[cfg_attr(feature = "ts", ts(export))]
2214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2216#[cfg_attr(feature = "serde", serde(tag = "type"))]
2217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2218#[repr(u32)]
2219#[doc = "Enumeration of estimator types"]
2220pub enum MavEstimatorType {
2221    #[doc = "Unknown type of the estimator."]
2222    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2223    #[doc = "This is a naive estimator without any real covariance feedback."]
2224    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2225    #[doc = "Computer vision based estimate. Might be up to scale."]
2226    MAV_ESTIMATOR_TYPE_VISION = 2,
2227    #[doc = "Visual-inertial estimate."]
2228    MAV_ESTIMATOR_TYPE_VIO = 3,
2229    #[doc = "Plain GPS estimate."]
2230    MAV_ESTIMATOR_TYPE_GPS = 4,
2231    #[doc = "Estimator integrating GPS and inertial sensing."]
2232    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2233    #[doc = "Estimate from external motion capturing system."]
2234    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2235    #[doc = "Estimator based on lidar sensor input."]
2236    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2237    #[doc = "Estimator on autopilot."]
2238    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2239}
2240impl MavEstimatorType {
2241    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2242}
2243impl Default for MavEstimatorType {
2244    fn default() -> Self {
2245        Self::DEFAULT
2246    }
2247}
2248#[cfg_attr(feature = "ts", derive(TS))]
2249#[cfg_attr(feature = "ts", ts(export))]
2250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2252#[cfg_attr(feature = "serde", serde(tag = "type"))]
2253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2254#[repr(u32)]
2255#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2256pub enum MavEventCurrentSequenceFlags {
2257    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2258    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2259}
2260impl MavEventCurrentSequenceFlags {
2261    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2262}
2263impl Default for MavEventCurrentSequenceFlags {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268#[cfg_attr(feature = "ts", derive(TS))]
2269#[cfg_attr(feature = "ts", ts(export))]
2270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2272#[cfg_attr(feature = "serde", serde(tag = "type"))]
2273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2274#[repr(u32)]
2275#[doc = "Reason for an event error response."]
2276pub enum MavEventErrorReason {
2277    #[doc = "The requested event is not available (anymore)."]
2278    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2279}
2280impl MavEventErrorReason {
2281    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2282}
2283impl Default for MavEventErrorReason {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[cfg_attr(feature = "ts", derive(TS))]
2289#[cfg_attr(feature = "ts", ts(export))]
2290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2292#[cfg_attr(feature = "serde", serde(tag = "type"))]
2293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2294#[repr(u32)]
2295#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2296pub enum MavFrame {
2297    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2298    MAV_FRAME_GLOBAL = 0,
2299    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2300    MAV_FRAME_LOCAL_NED = 1,
2301    #[doc = "NOT a coordinate frame, indicates a mission command."]
2302    MAV_FRAME_MISSION = 2,
2303    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2304    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2305    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2306    MAV_FRAME_LOCAL_ENU = 4,
2307    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2308    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2309    MAV_FRAME_GLOBAL_INT = 5,
2310    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2311    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2312    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2313    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2314    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2315    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2316    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2317    MAV_FRAME_BODY_NED = 8,
2318    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2319    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2320    MAV_FRAME_BODY_OFFSET_NED = 9,
2321    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2322    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2323    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2324    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2325    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2326    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2327    MAV_FRAME_BODY_FRD = 12,
2328    #[deprecated = "  (Deprecated since 2019-04)"]
2329    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2330    MAV_FRAME_RESERVED_13 = 13,
2331    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2332    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2333    MAV_FRAME_RESERVED_14 = 14,
2334    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2335    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2336    MAV_FRAME_RESERVED_15 = 15,
2337    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2338    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2339    MAV_FRAME_RESERVED_16 = 16,
2340    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2341    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2342    MAV_FRAME_RESERVED_17 = 17,
2343    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2344    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2345    MAV_FRAME_RESERVED_18 = 18,
2346    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2347    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2348    MAV_FRAME_RESERVED_19 = 19,
2349    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FRD = 20,
2351    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FLU = 21,
2353}
2354impl MavFrame {
2355    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2356}
2357impl Default for MavFrame {
2358    fn default() -> Self {
2359        Self::DEFAULT
2360    }
2361}
2362#[cfg_attr(feature = "ts", derive(TS))]
2363#[cfg_attr(feature = "ts", ts(export))]
2364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2366#[cfg_attr(feature = "serde", serde(tag = "type"))]
2367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2368#[repr(u32)]
2369#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2370pub enum MavFtpErr {
2371    #[doc = "None: No error"]
2372    MAV_FTP_ERR_NONE = 0,
2373    #[doc = "Fail: Unknown failure"]
2374    MAV_FTP_ERR_FAIL = 1,
2375    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2376    MAV_FTP_ERR_FAILERRNO = 2,
2377    #[doc = "InvalidDataSize: Payload size is invalid"]
2378    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2379    #[doc = "InvalidSession: Session is not currently open"]
2380    MAV_FTP_ERR_INVALIDSESSION = 4,
2381    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2382    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2383    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2384    MAV_FTP_ERR_EOF = 6,
2385    #[doc = "UnknownCommand: Unknown command / opcode"]
2386    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2387    #[doc = "FileExists: File/directory already exists"]
2388    MAV_FTP_ERR_FILEEXISTS = 8,
2389    #[doc = "FileProtected: File/directory is write protected"]
2390    MAV_FTP_ERR_FILEPROTECTED = 9,
2391    #[doc = "FileNotFound: File/directory not found"]
2392    MAV_FTP_ERR_FILENOTFOUND = 10,
2393}
2394impl MavFtpErr {
2395    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2396}
2397impl Default for MavFtpErr {
2398    fn default() -> Self {
2399        Self::DEFAULT
2400    }
2401}
2402#[cfg_attr(feature = "ts", derive(TS))]
2403#[cfg_attr(feature = "ts", ts(export))]
2404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2406#[cfg_attr(feature = "serde", serde(tag = "type"))]
2407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2408#[repr(u32)]
2409#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2410pub enum MavFtpOpcode {
2411    #[doc = "None. Ignored, always ACKed"]
2412    MAV_FTP_OPCODE_NONE = 0,
2413    #[doc = "TerminateSession: Terminates open Read session"]
2414    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2415    #[doc = "ResetSessions: Terminates all open read sessions"]
2416    MAV_FTP_OPCODE_RESETSESSION = 2,
2417    #[doc = "ListDirectory. List files and directories in path from offset"]
2418    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2419    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2420    MAV_FTP_OPCODE_OPENFILERO = 4,
2421    #[doc = "ReadFile: Reads size bytes from offset in session"]
2422    MAV_FTP_OPCODE_READFILE = 5,
2423    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2424    MAV_FTP_OPCODE_CREATEFILE = 6,
2425    #[doc = "WriteFile: Writes size bytes to offset in session"]
2426    MAV_FTP_OPCODE_WRITEFILE = 7,
2427    #[doc = "RemoveFile: Remove file at path"]
2428    MAV_FTP_OPCODE_REMOVEFILE = 8,
2429    #[doc = "CreateDirectory: Creates directory at path"]
2430    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2431    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2432    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2433    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2434    MAV_FTP_OPCODE_OPENFILEWO = 11,
2435    #[doc = "TruncateFile: Truncate file at path to offset length"]
2436    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2437    #[doc = "Rename: Rename path1 to path2"]
2438    MAV_FTP_OPCODE_RENAME = 13,
2439    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2440    MAV_FTP_OPCODE_CALCFILECRC = 14,
2441    #[doc = "BurstReadFile: Burst download session file"]
2442    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2443    #[doc = "ACK: ACK response"]
2444    MAV_FTP_OPCODE_ACK = 128,
2445    #[doc = "NAK: NAK response"]
2446    MAV_FTP_OPCODE_NAK = 129,
2447}
2448impl MavFtpOpcode {
2449    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2450}
2451impl Default for MavFtpOpcode {
2452    fn default() -> Self {
2453        Self::DEFAULT
2454    }
2455}
2456#[cfg_attr(feature = "ts", derive(TS))]
2457#[cfg_attr(feature = "ts", ts(export))]
2458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2460#[cfg_attr(feature = "serde", serde(tag = "type"))]
2461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2462#[repr(u32)]
2463#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2464pub enum MavFuelType {
2465    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2466    MAV_FUEL_TYPE_UNKNOWN = 0,
2467    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2468    MAV_FUEL_TYPE_LIQUID = 1,
2469    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2470    MAV_FUEL_TYPE_GAS = 2,
2471}
2472impl MavFuelType {
2473    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2474}
2475impl Default for MavFuelType {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2481impl MavGeneratorStatusFlag {
2482    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2483}
2484impl Default for MavGeneratorStatusFlag {
2485    fn default() -> Self {
2486        Self::DEFAULT
2487    }
2488}
2489#[cfg_attr(feature = "ts", derive(TS))]
2490#[cfg_attr(feature = "ts", ts(export))]
2491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2493#[cfg_attr(feature = "serde", serde(tag = "type"))]
2494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2495#[repr(u32)]
2496#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2497pub enum MavGoto {
2498    #[doc = "Hold at the current position."]
2499    MAV_GOTO_DO_HOLD = 0,
2500    #[doc = "Continue with the next item in mission execution."]
2501    MAV_GOTO_DO_CONTINUE = 1,
2502    #[doc = "Hold at the current position of the system"]
2503    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2504    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2505    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2506}
2507impl MavGoto {
2508    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2509}
2510impl Default for MavGoto {
2511    fn default() -> Self {
2512        Self::DEFAULT
2513    }
2514}
2515#[cfg_attr(feature = "ts", derive(TS))]
2516#[cfg_attr(feature = "ts", ts(export))]
2517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "serde", serde(tag = "type"))]
2520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2521#[repr(u32)]
2522#[doc = "Enumeration of landed detector states"]
2523pub enum MavLandedState {
2524    #[doc = "MAV landed state is unknown"]
2525    MAV_LANDED_STATE_UNDEFINED = 0,
2526    #[doc = "MAV is landed (on ground)"]
2527    MAV_LANDED_STATE_ON_GROUND = 1,
2528    #[doc = "MAV is in air"]
2529    MAV_LANDED_STATE_IN_AIR = 2,
2530    #[doc = "MAV currently taking off"]
2531    MAV_LANDED_STATE_TAKEOFF = 3,
2532    #[doc = "MAV currently landing"]
2533    MAV_LANDED_STATE_LANDING = 4,
2534}
2535impl MavLandedState {
2536    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2537}
2538impl Default for MavLandedState {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543#[cfg_attr(feature = "ts", derive(TS))]
2544#[cfg_attr(feature = "ts", ts(export))]
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2551pub enum MavMissionResult {
2552    #[doc = "mission accepted OK"]
2553    MAV_MISSION_ACCEPTED = 0,
2554    #[doc = "Generic error / not accepting mission commands at all right now."]
2555    MAV_MISSION_ERROR = 1,
2556    #[doc = "Coordinate frame is not supported."]
2557    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2558    #[doc = "Command is not supported."]
2559    MAV_MISSION_UNSUPPORTED = 3,
2560    #[doc = "Mission items exceed storage space."]
2561    MAV_MISSION_NO_SPACE = 4,
2562    #[doc = "One of the parameters has an invalid value."]
2563    MAV_MISSION_INVALID = 5,
2564    #[doc = "param1 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM1 = 6,
2566    #[doc = "param2 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM2 = 7,
2568    #[doc = "param3 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM3 = 8,
2570    #[doc = "param4 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM4 = 9,
2572    #[doc = "x / param5 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM5_X = 10,
2574    #[doc = "y / param6 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM6_Y = 11,
2576    #[doc = "z / param7 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM7 = 12,
2578    #[doc = "Mission item received out of sequence"]
2579    MAV_MISSION_INVALID_SEQUENCE = 13,
2580    #[doc = "Not accepting any mission commands from this communication partner."]
2581    MAV_MISSION_DENIED = 14,
2582    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2583    MAV_MISSION_OPERATION_CANCELLED = 15,
2584}
2585impl MavMissionResult {
2586    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2587}
2588impl Default for MavMissionResult {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Type of mission items being requested/sent in mission protocol."]
2601pub enum MavMissionType {
2602    #[doc = "Items are mission commands for main mission."]
2603    MAV_MISSION_TYPE_MISSION = 0,
2604    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2605    MAV_MISSION_TYPE_FENCE = 1,
2606    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2607    MAV_MISSION_TYPE_RALLY = 2,
2608    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2609    MAV_MISSION_TYPE_ALL = 255,
2610}
2611impl MavMissionType {
2612    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2613}
2614impl Default for MavMissionType {
2615    fn default() -> Self {
2616        Self::DEFAULT
2617    }
2618}
2619#[cfg_attr(feature = "ts", derive(TS))]
2620#[cfg_attr(feature = "ts", ts(export))]
2621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2623#[cfg_attr(feature = "serde", serde(tag = "type"))]
2624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2625#[repr(u32)]
2626#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2627pub enum MavMode {
2628    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2629    MAV_MODE_PREFLIGHT = 0,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_DISARMED = 80,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_ARMED = 208,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_DISARMED = 64,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_ARMED = 192,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_DISARMED = 88,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_ARMED = 216,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_DISARMED = 92,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_ARMED = 220,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_DISARMED = 66,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_ARMED = 194,
2650}
2651impl MavMode {
2652    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2653}
2654impl Default for MavMode {
2655    fn default() -> Self {
2656        Self::DEFAULT
2657    }
2658}
2659bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2660impl MavModeFlag {
2661    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2662}
2663impl Default for MavModeFlag {
2664    fn default() -> Self {
2665        Self::DEFAULT
2666    }
2667}
2668#[cfg_attr(feature = "ts", derive(TS))]
2669#[cfg_attr(feature = "ts", ts(export))]
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2676pub enum MavModeFlagDecodePosition {
2677    #[doc = "First bit:  10000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2679    #[doc = "Second bit: 01000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2681    #[doc = "Third bit:  00100000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2683    #[doc = "Fourth bit: 00010000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2685    #[doc = "Fifth bit:  00001000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2687    #[doc = "Sixth bit:   00000100"]
2688    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2689    #[doc = "Seventh bit: 00000010"]
2690    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2691    #[doc = "Eighth bit: 00000001"]
2692    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2693}
2694impl MavModeFlagDecodePosition {
2695    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2696}
2697impl Default for MavModeFlagDecodePosition {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2703impl MavModeProperty {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2705}
2706impl Default for MavModeProperty {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711#[cfg_attr(feature = "ts", derive(TS))]
2712#[cfg_attr(feature = "ts", ts(export))]
2713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "serde", serde(tag = "type"))]
2716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2717#[repr(u32)]
2718#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2719#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2720pub enum MavMountMode {
2721    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2722    MAV_MOUNT_MODE_RETRACT = 0,
2723    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2724    MAV_MOUNT_MODE_NEUTRAL = 1,
2725    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2727    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_RC_TARGETING = 3,
2729    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2730    MAV_MOUNT_MODE_GPS_POINT = 4,
2731    #[doc = "Gimbal tracks system with specified system ID"]
2732    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2733    #[doc = "Gimbal tracks home position"]
2734    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2735}
2736impl MavMountMode {
2737    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2738}
2739impl Default for MavMountMode {
2740    fn default() -> Self {
2741        Self::DEFAULT
2742    }
2743}
2744#[cfg_attr(feature = "ts", derive(TS))]
2745#[cfg_attr(feature = "ts", ts(export))]
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751pub enum MavOdidArmStatus {
2752    #[doc = "Passing arming checks."]
2753    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2754    #[doc = "Generic arming failure, see error string for details."]
2755    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2756}
2757impl MavOdidArmStatus {
2758    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2759}
2760impl Default for MavOdidArmStatus {
2761    fn default() -> Self {
2762        Self::DEFAULT
2763    }
2764}
2765#[cfg_attr(feature = "ts", derive(TS))]
2766#[cfg_attr(feature = "ts", ts(export))]
2767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2769#[cfg_attr(feature = "serde", serde(tag = "type"))]
2770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2771#[repr(u32)]
2772pub enum MavOdidAuthType {
2773    #[doc = "No authentication type is specified."]
2774    MAV_ODID_AUTH_TYPE_NONE = 0,
2775    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2776    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2777    #[doc = "Signature for the Operator ID."]
2778    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2779    #[doc = "Signature for the entire message set."]
2780    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2781    #[doc = "Authentication is provided by Network Remote ID."]
2782    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2783    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2784    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2785}
2786impl MavOdidAuthType {
2787    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2788}
2789impl Default for MavOdidAuthType {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidCategoryEu {
2802    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2803    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2804    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2805    MAV_ODID_CATEGORY_EU_OPEN = 1,
2806    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2807    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2808    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2809    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2810}
2811impl MavOdidCategoryEu {
2812    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2813}
2814impl Default for MavOdidCategoryEu {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826pub enum MavOdidClassEu {
2827    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2828    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2830    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2832    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2834    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2836    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2838    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2840    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2842    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2843}
2844impl MavOdidClassEu {
2845    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2846}
2847impl Default for MavOdidClassEu {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidClassificationType {
2860    #[doc = "The classification type for the UA is undeclared."]
2861    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2862    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2863    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2864}
2865impl MavOdidClassificationType {
2866    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2867}
2868impl Default for MavOdidClassificationType {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidDescType {
2881    #[doc = "Optional free-form text description of the purpose of the flight."]
2882    MAV_ODID_DESC_TYPE_TEXT = 0,
2883    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2885    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2887}
2888impl MavOdidDescType {
2889    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2890}
2891impl Default for MavOdidDescType {
2892    fn default() -> Self {
2893        Self::DEFAULT
2894    }
2895}
2896#[cfg_attr(feature = "ts", derive(TS))]
2897#[cfg_attr(feature = "ts", ts(export))]
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903pub enum MavOdidHeightRef {
2904    #[doc = "The height field is relative to the take-off location."]
2905    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2906    #[doc = "The height field is relative to ground."]
2907    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2908}
2909impl MavOdidHeightRef {
2910    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2911}
2912impl Default for MavOdidHeightRef {
2913    fn default() -> Self {
2914        Self::DEFAULT
2915    }
2916}
2917#[cfg_attr(feature = "ts", derive(TS))]
2918#[cfg_attr(feature = "ts", ts(export))]
2919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2921#[cfg_attr(feature = "serde", serde(tag = "type"))]
2922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2923#[repr(u32)]
2924pub enum MavOdidHorAcc {
2925    #[doc = "The horizontal accuracy is unknown."]
2926    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2927    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2928    MAV_ODID_HOR_ACC_10NM = 1,
2929    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2930    MAV_ODID_HOR_ACC_4NM = 2,
2931    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2932    MAV_ODID_HOR_ACC_2NM = 3,
2933    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2934    MAV_ODID_HOR_ACC_1NM = 4,
2935    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2936    MAV_ODID_HOR_ACC_0_5NM = 5,
2937    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2938    MAV_ODID_HOR_ACC_0_3NM = 6,
2939    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2940    MAV_ODID_HOR_ACC_0_1NM = 7,
2941    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2942    MAV_ODID_HOR_ACC_0_05NM = 8,
2943    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2944    MAV_ODID_HOR_ACC_30_METER = 9,
2945    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2946    MAV_ODID_HOR_ACC_10_METER = 10,
2947    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2948    MAV_ODID_HOR_ACC_3_METER = 11,
2949    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2950    MAV_ODID_HOR_ACC_1_METER = 12,
2951}
2952impl MavOdidHorAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidHorAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidIdType {
2968    #[doc = "No type defined."]
2969    MAV_ODID_ID_TYPE_NONE = 0,
2970    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2971    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2972    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2973    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2974    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2975    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2976    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2977    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2978}
2979impl MavOdidIdType {
2980    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2981}
2982impl Default for MavOdidIdType {
2983    fn default() -> Self {
2984        Self::DEFAULT
2985    }
2986}
2987#[cfg_attr(feature = "ts", derive(TS))]
2988#[cfg_attr(feature = "ts", ts(export))]
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994pub enum MavOdidOperatorIdType {
2995    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2996    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2997}
2998impl MavOdidOperatorIdType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3000}
3001impl Default for MavOdidOperatorIdType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidOperatorLocationType {
3014    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3016    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3018    #[doc = "The location/altitude of the operator are fixed values."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3020}
3021impl MavOdidOperatorLocationType {
3022    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3023}
3024impl Default for MavOdidOperatorLocationType {
3025    fn default() -> Self {
3026        Self::DEFAULT
3027    }
3028}
3029#[cfg_attr(feature = "ts", derive(TS))]
3030#[cfg_attr(feature = "ts", ts(export))]
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidSpeedAcc {
3037    #[doc = "The speed accuracy is unknown."]
3038    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3039    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3040    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3041    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3042    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3043    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3044    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3045    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3046    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3047}
3048impl MavOdidSpeedAcc {
3049    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3050}
3051impl Default for MavOdidSpeedAcc {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidStatus {
3064    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3065    MAV_ODID_STATUS_UNDECLARED = 0,
3066    #[doc = "The UA is on the ground."]
3067    MAV_ODID_STATUS_GROUND = 1,
3068    #[doc = "The UA is in the air."]
3069    MAV_ODID_STATUS_AIRBORNE = 2,
3070    #[doc = "The UA is having an emergency."]
3071    MAV_ODID_STATUS_EMERGENCY = 3,
3072    #[doc = "The remote ID system is failing or unreliable in some way."]
3073    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3074}
3075impl MavOdidStatus {
3076    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3077}
3078impl Default for MavOdidStatus {
3079    fn default() -> Self {
3080        Self::DEFAULT
3081    }
3082}
3083#[cfg_attr(feature = "ts", derive(TS))]
3084#[cfg_attr(feature = "ts", ts(export))]
3085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3087#[cfg_attr(feature = "serde", serde(tag = "type"))]
3088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3089#[repr(u32)]
3090pub enum MavOdidTimeAcc {
3091    #[doc = "The timestamp accuracy is unknown."]
3092    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3094    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3096    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3098    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3100    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3102    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3104    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3106    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3108    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3110    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3112    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3114    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3116    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3118    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3120    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3122    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3123}
3124impl MavOdidTimeAcc {
3125    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3126}
3127impl Default for MavOdidTimeAcc {
3128    fn default() -> Self {
3129        Self::DEFAULT
3130    }
3131}
3132#[cfg_attr(feature = "ts", derive(TS))]
3133#[cfg_attr(feature = "ts", ts(export))]
3134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3136#[cfg_attr(feature = "serde", serde(tag = "type"))]
3137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3138#[repr(u32)]
3139pub enum MavOdidUaType {
3140    #[doc = "No UA (Unmanned Aircraft) type defined."]
3141    MAV_ODID_UA_TYPE_NONE = 0,
3142    #[doc = "Aeroplane/Airplane. Fixed wing."]
3143    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3144    #[doc = "Helicopter or multirotor."]
3145    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3146    #[doc = "Gyroplane."]
3147    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3148    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3149    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3150    #[doc = "Ornithopter."]
3151    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3152    #[doc = "Glider."]
3153    MAV_ODID_UA_TYPE_GLIDER = 6,
3154    #[doc = "Kite."]
3155    MAV_ODID_UA_TYPE_KITE = 7,
3156    #[doc = "Free Balloon."]
3157    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3158    #[doc = "Captive Balloon."]
3159    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3160    #[doc = "Airship. E.g. a blimp."]
3161    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3162    #[doc = "Free Fall/Parachute (unpowered)."]
3163    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3164    #[doc = "Rocket."]
3165    MAV_ODID_UA_TYPE_ROCKET = 12,
3166    #[doc = "Tethered powered aircraft."]
3167    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3168    #[doc = "Ground Obstacle."]
3169    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3170    #[doc = "Other type of aircraft not listed earlier."]
3171    MAV_ODID_UA_TYPE_OTHER = 15,
3172}
3173impl MavOdidUaType {
3174    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3175}
3176impl Default for MavOdidUaType {
3177    fn default() -> Self {
3178        Self::DEFAULT
3179    }
3180}
3181#[cfg_attr(feature = "ts", derive(TS))]
3182#[cfg_attr(feature = "ts", ts(export))]
3183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3185#[cfg_attr(feature = "serde", serde(tag = "type"))]
3186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3187#[repr(u32)]
3188pub enum MavOdidVerAcc {
3189    #[doc = "The vertical accuracy is unknown."]
3190    MAV_ODID_VER_ACC_UNKNOWN = 0,
3191    #[doc = "The vertical accuracy is smaller than 150 meter."]
3192    MAV_ODID_VER_ACC_150_METER = 1,
3193    #[doc = "The vertical accuracy is smaller than 45 meter."]
3194    MAV_ODID_VER_ACC_45_METER = 2,
3195    #[doc = "The vertical accuracy is smaller than 25 meter."]
3196    MAV_ODID_VER_ACC_25_METER = 3,
3197    #[doc = "The vertical accuracy is smaller than 10 meter."]
3198    MAV_ODID_VER_ACC_10_METER = 4,
3199    #[doc = "The vertical accuracy is smaller than 3 meter."]
3200    MAV_ODID_VER_ACC_3_METER = 5,
3201    #[doc = "The vertical accuracy is smaller than 1 meter."]
3202    MAV_ODID_VER_ACC_1_METER = 6,
3203}
3204impl MavOdidVerAcc {
3205    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3206}
3207impl Default for MavOdidVerAcc {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[cfg_attr(feature = "ts", derive(TS))]
3213#[cfg_attr(feature = "ts", ts(export))]
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3220pub enum MavParamExtType {
3221    #[doc = "8-bit unsigned integer"]
3222    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3223    #[doc = "8-bit signed integer"]
3224    MAV_PARAM_EXT_TYPE_INT8 = 2,
3225    #[doc = "16-bit unsigned integer"]
3226    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3227    #[doc = "16-bit signed integer"]
3228    MAV_PARAM_EXT_TYPE_INT16 = 4,
3229    #[doc = "32-bit unsigned integer"]
3230    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3231    #[doc = "32-bit signed integer"]
3232    MAV_PARAM_EXT_TYPE_INT32 = 6,
3233    #[doc = "64-bit unsigned integer"]
3234    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3235    #[doc = "64-bit signed integer"]
3236    MAV_PARAM_EXT_TYPE_INT64 = 8,
3237    #[doc = "32-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3239    #[doc = "64-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3241    #[doc = "Custom Type"]
3242    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3243}
3244impl MavParamExtType {
3245    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3246}
3247impl Default for MavParamExtType {
3248    fn default() -> Self {
3249        Self::DEFAULT
3250    }
3251}
3252#[cfg_attr(feature = "ts", derive(TS))]
3253#[cfg_attr(feature = "ts", ts(export))]
3254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3256#[cfg_attr(feature = "serde", serde(tag = "type"))]
3257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3258#[repr(u32)]
3259#[doc = "Specifies the datatype of a MAVLink parameter."]
3260pub enum MavParamType {
3261    #[doc = "8-bit unsigned integer"]
3262    MAV_PARAM_TYPE_UINT8 = 1,
3263    #[doc = "8-bit signed integer"]
3264    MAV_PARAM_TYPE_INT8 = 2,
3265    #[doc = "16-bit unsigned integer"]
3266    MAV_PARAM_TYPE_UINT16 = 3,
3267    #[doc = "16-bit signed integer"]
3268    MAV_PARAM_TYPE_INT16 = 4,
3269    #[doc = "32-bit unsigned integer"]
3270    MAV_PARAM_TYPE_UINT32 = 5,
3271    #[doc = "32-bit signed integer"]
3272    MAV_PARAM_TYPE_INT32 = 6,
3273    #[doc = "64-bit unsigned integer"]
3274    MAV_PARAM_TYPE_UINT64 = 7,
3275    #[doc = "64-bit signed integer"]
3276    MAV_PARAM_TYPE_INT64 = 8,
3277    #[doc = "32-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL32 = 9,
3279    #[doc = "64-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL64 = 10,
3281}
3282impl MavParamType {
3283    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3284}
3285impl Default for MavParamType {
3286    fn default() -> Self {
3287        Self::DEFAULT
3288    }
3289}
3290bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3291impl MavPowerStatus {
3292    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3293}
3294impl Default for MavPowerStatus {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3300impl MavProtocolCapability {
3301    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3302}
3303impl Default for MavProtocolCapability {
3304    fn default() -> Self {
3305        Self::DEFAULT
3306    }
3307}
3308#[cfg_attr(feature = "ts", derive(TS))]
3309#[cfg_attr(feature = "ts", ts(export))]
3310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3312#[cfg_attr(feature = "serde", serde(tag = "type"))]
3313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3314#[repr(u32)]
3315#[doc = "Result from a MAVLink command (MAV_CMD)"]
3316pub enum MavResult {
3317    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3318    MAV_RESULT_ACCEPTED = 0,
3319    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3320    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3321    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3322    MAV_RESULT_DENIED = 2,
3323    #[doc = "Command is not supported (unknown)."]
3324    MAV_RESULT_UNSUPPORTED = 3,
3325    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3326    MAV_RESULT_FAILED = 4,
3327    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3328    MAV_RESULT_IN_PROGRESS = 5,
3329    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3330    MAV_RESULT_CANCELLED = 6,
3331    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3332    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3333    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3334    MAV_RESULT_COMMAND_INT_ONLY = 8,
3335    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3336    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3337}
3338impl MavResult {
3339    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3340}
3341impl Default for MavResult {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[cfg_attr(feature = "ts", derive(TS))]
3347#[cfg_attr(feature = "ts", ts(export))]
3348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3350#[cfg_attr(feature = "serde", serde(tag = "type"))]
3351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3352#[repr(u32)]
3353#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3354#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3355pub enum MavRoi {
3356    #[doc = "No region of interest."]
3357    MAV_ROI_NONE = 0,
3358    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3359    MAV_ROI_WPNEXT = 1,
3360    #[doc = "Point toward given waypoint."]
3361    MAV_ROI_WPINDEX = 2,
3362    #[doc = "Point toward fixed location."]
3363    MAV_ROI_LOCATION = 3,
3364    #[doc = "Point toward of given id."]
3365    MAV_ROI_TARGET = 4,
3366}
3367impl MavRoi {
3368    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3369}
3370impl Default for MavRoi {
3371    fn default() -> Self {
3372        Self::DEFAULT
3373    }
3374}
3375#[cfg_attr(feature = "ts", derive(TS))]
3376#[cfg_attr(feature = "ts", ts(export))]
3377#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3379#[cfg_attr(feature = "serde", serde(tag = "type"))]
3380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3381#[repr(u32)]
3382#[doc = "Enumeration of sensor orientation, according to its rotations"]
3383pub enum MavSensorOrientation {
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3385    MAV_SENSOR_ROTATION_NONE = 0,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3387    MAV_SENSOR_ROTATION_YAW_45 = 1,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3389    MAV_SENSOR_ROTATION_YAW_90 = 2,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3391    MAV_SENSOR_ROTATION_YAW_135 = 3,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3393    MAV_SENSOR_ROTATION_YAW_180 = 4,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3395    MAV_SENSOR_ROTATION_YAW_225 = 5,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3397    MAV_SENSOR_ROTATION_YAW_270 = 6,
3398    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3399    MAV_SENSOR_ROTATION_YAW_315 = 7,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3401    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3406    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3407    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3408    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3409    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3414    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3415    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3417    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3422    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3423    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3425    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3430    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3431    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3432    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3434    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3438    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3439    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3440    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3442    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3444    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3446    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3448    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3450    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3452    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3454    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3455    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3456    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3458    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3459    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3460    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3461    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3462    #[doc = "Pitch: 315"]
3463    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3464    #[doc = "Roll: 90, Pitch: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3466    #[doc = "Custom orientation"]
3467    MAV_SENSOR_ROTATION_CUSTOM = 100,
3468}
3469impl MavSensorOrientation {
3470    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3471}
3472impl Default for MavSensorOrientation {
3473    fn default() -> Self {
3474        Self::DEFAULT
3475    }
3476}
3477#[cfg_attr(feature = "ts", derive(TS))]
3478#[cfg_attr(feature = "ts", ts(export))]
3479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3481#[cfg_attr(feature = "serde", serde(tag = "type"))]
3482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3483#[repr(u32)]
3484#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3485pub enum MavSeverity {
3486    #[doc = "System is unusable. This is a \"panic\" condition."]
3487    MAV_SEVERITY_EMERGENCY = 0,
3488    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3489    MAV_SEVERITY_ALERT = 1,
3490    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3491    MAV_SEVERITY_CRITICAL = 2,
3492    #[doc = "Indicates an error in secondary/redundant systems."]
3493    MAV_SEVERITY_ERROR = 3,
3494    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3495    MAV_SEVERITY_WARNING = 4,
3496    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3497    MAV_SEVERITY_NOTICE = 5,
3498    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3499    MAV_SEVERITY_INFO = 6,
3500    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3501    MAV_SEVERITY_DEBUG = 7,
3502}
3503impl MavSeverity {
3504    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3505}
3506impl Default for MavSeverity {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3519pub enum MavStandardMode {
3520    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3521    MAV_STANDARD_MODE_NON_STANDARD = 0,
3522    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3524    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_ORBIT = 2,
3526    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_CRUISE = 3,
3528    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3529    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3530    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3531    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3532    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3533    MAV_STANDARD_MODE_MISSION = 6,
3534    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_LAND = 7,
3536    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3537    MAV_STANDARD_MODE_TAKEOFF = 8,
3538}
3539impl MavStandardMode {
3540    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3541}
3542impl Default for MavStandardMode {
3543    fn default() -> Self {
3544        Self::DEFAULT
3545    }
3546}
3547#[cfg_attr(feature = "ts", derive(TS))]
3548#[cfg_attr(feature = "ts", ts(export))]
3549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3551#[cfg_attr(feature = "serde", serde(tag = "type"))]
3552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3553#[repr(u32)]
3554pub enum MavState {
3555    #[doc = "Uninitialized system, state is unknown."]
3556    MAV_STATE_UNINIT = 0,
3557    #[doc = "System is booting up."]
3558    MAV_STATE_BOOT = 1,
3559    #[doc = "System is calibrating and not flight-ready."]
3560    MAV_STATE_CALIBRATING = 2,
3561    #[doc = "System is grounded and on standby. It can be launched any time."]
3562    MAV_STATE_STANDBY = 3,
3563    #[doc = "System is active and might be already airborne. Motors are engaged."]
3564    MAV_STATE_ACTIVE = 4,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3566    MAV_STATE_CRITICAL = 5,
3567    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3568    MAV_STATE_EMERGENCY = 6,
3569    #[doc = "System just initialized its power-down sequence, will shut down now."]
3570    MAV_STATE_POWEROFF = 7,
3571    #[doc = "System is terminating itself (failsafe or commanded)."]
3572    MAV_STATE_FLIGHT_TERMINATION = 8,
3573}
3574impl MavState {
3575    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3576}
3577impl Default for MavState {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3583impl MavSysStatusSensor {
3584    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3585}
3586impl Default for MavSysStatusSensor {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3592impl MavSysStatusSensorExtended {
3593    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3594}
3595impl Default for MavSysStatusSensorExtended {
3596    fn default() -> Self {
3597        Self::DEFAULT
3598    }
3599}
3600#[cfg_attr(feature = "ts", derive(TS))]
3601#[cfg_attr(feature = "ts", ts(export))]
3602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3604#[cfg_attr(feature = "serde", serde(tag = "type"))]
3605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3606#[repr(u32)]
3607pub enum MavTunnelPayloadType {
3608    #[doc = "Encoding of payload unknown."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3628    #[doc = "Registered for STorM32 gimbal controller."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3630    #[doc = "Registered for ModalAI remote OSD protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3632    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3634    #[doc = "Registered for ModalAI vendor use."]
3635    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3636}
3637impl MavTunnelPayloadType {
3638    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3639}
3640impl Default for MavTunnelPayloadType {
3641    fn default() -> Self {
3642        Self::DEFAULT
3643    }
3644}
3645#[cfg_attr(feature = "ts", derive(TS))]
3646#[cfg_attr(feature = "ts", ts(export))]
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3653pub enum MavType {
3654    #[doc = "Generic micro air vehicle"]
3655    MAV_TYPE_GENERIC = 0,
3656    #[doc = "Fixed wing aircraft."]
3657    MAV_TYPE_FIXED_WING = 1,
3658    #[doc = "Quadrotor"]
3659    MAV_TYPE_QUADROTOR = 2,
3660    #[doc = "Coaxial helicopter"]
3661    MAV_TYPE_COAXIAL = 3,
3662    #[doc = "Normal helicopter with tail rotor."]
3663    MAV_TYPE_HELICOPTER = 4,
3664    #[doc = "Ground installation"]
3665    MAV_TYPE_ANTENNA_TRACKER = 5,
3666    #[doc = "Operator control unit / ground control station"]
3667    MAV_TYPE_GCS = 6,
3668    #[doc = "Airship, controlled"]
3669    MAV_TYPE_AIRSHIP = 7,
3670    #[doc = "Free balloon, uncontrolled"]
3671    MAV_TYPE_FREE_BALLOON = 8,
3672    #[doc = "Rocket"]
3673    MAV_TYPE_ROCKET = 9,
3674    #[doc = "Ground rover"]
3675    MAV_TYPE_GROUND_ROVER = 10,
3676    #[doc = "Surface vessel, boat, ship"]
3677    MAV_TYPE_SURFACE_BOAT = 11,
3678    #[doc = "Submarine"]
3679    MAV_TYPE_SUBMARINE = 12,
3680    #[doc = "Hexarotor"]
3681    MAV_TYPE_HEXAROTOR = 13,
3682    #[doc = "Octorotor"]
3683    MAV_TYPE_OCTOROTOR = 14,
3684    #[doc = "Tricopter"]
3685    MAV_TYPE_TRICOPTER = 15,
3686    #[doc = "Flapping wing"]
3687    MAV_TYPE_FLAPPING_WING = 16,
3688    #[doc = "Kite"]
3689    MAV_TYPE_KITE = 17,
3690    #[doc = "Onboard companion controller"]
3691    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3692    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3694    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3695    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3696    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3697    MAV_TYPE_VTOL_TILTROTOR = 21,
3698    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3699    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3700    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3701    MAV_TYPE_VTOL_TAILSITTER = 23,
3702    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3703    MAV_TYPE_VTOL_TILTWING = 24,
3704    #[doc = "VTOL reserved 5"]
3705    MAV_TYPE_VTOL_RESERVED5 = 25,
3706    #[doc = "Gimbal"]
3707    MAV_TYPE_GIMBAL = 26,
3708    #[doc = "ADSB system"]
3709    MAV_TYPE_ADSB = 27,
3710    #[doc = "Steerable, nonrigid airfoil"]
3711    MAV_TYPE_PARAFOIL = 28,
3712    #[doc = "Dodecarotor"]
3713    MAV_TYPE_DODECAROTOR = 29,
3714    #[doc = "Camera"]
3715    MAV_TYPE_CAMERA = 30,
3716    #[doc = "Charging station"]
3717    MAV_TYPE_CHARGING_STATION = 31,
3718    #[doc = "FLARM collision avoidance system"]
3719    MAV_TYPE_FLARM = 32,
3720    #[doc = "Servo"]
3721    MAV_TYPE_SERVO = 33,
3722    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3723    MAV_TYPE_ODID = 34,
3724    #[doc = "Decarotor"]
3725    MAV_TYPE_DECAROTOR = 35,
3726    #[doc = "Battery"]
3727    MAV_TYPE_BATTERY = 36,
3728    #[doc = "Parachute"]
3729    MAV_TYPE_PARACHUTE = 37,
3730    #[doc = "Log"]
3731    MAV_TYPE_LOG = 38,
3732    #[doc = "OSD"]
3733    MAV_TYPE_OSD = 39,
3734    #[doc = "IMU"]
3735    MAV_TYPE_IMU = 40,
3736    #[doc = "GPS"]
3737    MAV_TYPE_GPS = 41,
3738    #[doc = "Winch"]
3739    MAV_TYPE_WINCH = 42,
3740    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3741    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3742    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3743    MAV_TYPE_ILLUMINATOR = 44,
3744    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3745    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3746}
3747impl MavType {
3748    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3749}
3750impl Default for MavType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "Enumeration of VTOL states"]
3763pub enum MavVtolState {
3764    #[doc = "MAV is not configured as VTOL"]
3765    MAV_VTOL_STATE_UNDEFINED = 0,
3766    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3767    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3768    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3769    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3770    #[doc = "VTOL is in multicopter state"]
3771    MAV_VTOL_STATE_MC = 3,
3772    #[doc = "VTOL is in fixed-wing state"]
3773    MAV_VTOL_STATE_FW = 4,
3774}
3775impl MavVtolState {
3776    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3777}
3778impl Default for MavVtolState {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3784impl MavWinchStatusFlag {
3785    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3786}
3787impl Default for MavWinchStatusFlag {
3788    fn default() -> Self {
3789        Self::DEFAULT
3790    }
3791}
3792#[cfg_attr(feature = "ts", derive(TS))]
3793#[cfg_attr(feature = "ts", ts(export))]
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799pub enum MavlinkDataStreamType {
3800    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3801    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3802    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3803    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3804    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3805    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3806}
3807impl MavlinkDataStreamType {
3808    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3809}
3810impl Default for MavlinkDataStreamType {
3811    fn default() -> Self {
3812        Self::DEFAULT
3813    }
3814}
3815#[cfg_attr(feature = "ts", derive(TS))]
3816#[cfg_attr(feature = "ts", ts(export))]
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3823pub enum MissionState {
3824    #[doc = "The mission status reporting is not supported."]
3825    MISSION_STATE_UNKNOWN = 0,
3826    #[doc = "No mission on the vehicle."]
3827    MISSION_STATE_NO_MISSION = 1,
3828    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3829    MISSION_STATE_NOT_STARTED = 2,
3830    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3831    MISSION_STATE_ACTIVE = 3,
3832    #[doc = "Mission is paused when in auto mode."]
3833    MISSION_STATE_PAUSED = 4,
3834    #[doc = "Mission has executed all mission items."]
3835    MISSION_STATE_COMPLETE = 5,
3836}
3837impl MissionState {
3838    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3839}
3840impl Default for MissionState {
3841    fn default() -> Self {
3842        Self::DEFAULT
3843    }
3844}
3845#[cfg_attr(feature = "ts", derive(TS))]
3846#[cfg_attr(feature = "ts", ts(export))]
3847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3849#[cfg_attr(feature = "serde", serde(tag = "type"))]
3850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3851#[repr(u32)]
3852#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3853pub enum MotorTestOrder {
3854    #[doc = "Default autopilot motor test method."]
3855    MOTOR_TEST_ORDER_DEFAULT = 0,
3856    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3857    MOTOR_TEST_ORDER_SEQUENCE = 1,
3858    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3859    MOTOR_TEST_ORDER_BOARD = 2,
3860}
3861impl MotorTestOrder {
3862    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3863}
3864impl Default for MotorTestOrder {
3865    fn default() -> Self {
3866        Self::DEFAULT
3867    }
3868}
3869#[cfg_attr(feature = "ts", derive(TS))]
3870#[cfg_attr(feature = "ts", ts(export))]
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3877pub enum MotorTestThrottleType {
3878    #[doc = "Throttle as a percentage (0 ~ 100)"]
3879    MOTOR_TEST_THROTTLE_PERCENT = 0,
3880    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3881    MOTOR_TEST_THROTTLE_PWM = 1,
3882    #[doc = "Throttle pass-through from pilot's transmitter."]
3883    MOTOR_TEST_THROTTLE_PILOT = 2,
3884    #[doc = "Per-motor compass calibration test."]
3885    MOTOR_TEST_COMPASS_CAL = 3,
3886}
3887impl MotorTestThrottleType {
3888    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3889}
3890impl Default for MotorTestThrottleType {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902pub enum NavVtolLandOptions {
3903    #[doc = "Default autopilot landing behaviour."]
3904    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3905    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3906    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3907    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3908    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3909}
3910impl NavVtolLandOptions {
3911    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3912}
3913impl Default for NavVtolLandOptions {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[cfg_attr(feature = "ts", derive(TS))]
3919#[cfg_attr(feature = "ts", ts(export))]
3920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3922#[cfg_attr(feature = "serde", serde(tag = "type"))]
3923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3924#[repr(u32)]
3925#[doc = "Yaw behaviour during orbit flight."]
3926pub enum OrbitYawBehaviour {
3927    #[doc = "Vehicle front points to the center (default)."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3929    #[doc = "Vehicle front holds heading when message received."]
3930    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3931    #[doc = "Yaw uncontrolled."]
3932    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3933    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3934    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3935    #[doc = "Yaw controlled by RC input."]
3936    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3937    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3938    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3939}
3940impl OrbitYawBehaviour {
3941    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3942}
3943impl Default for OrbitYawBehaviour {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[cfg_attr(feature = "ts", derive(TS))]
3949#[cfg_attr(feature = "ts", ts(export))]
3950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3952#[cfg_attr(feature = "serde", serde(tag = "type"))]
3953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3954#[repr(u32)]
3955#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3956pub enum ParachuteAction {
3957    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3958    PARACHUTE_DISABLE = 0,
3959    #[doc = "Enable auto-release of parachute."]
3960    PARACHUTE_ENABLE = 1,
3961    #[doc = "Release parachute and kill motors."]
3962    PARACHUTE_RELEASE = 2,
3963}
3964impl ParachuteAction {
3965    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3966}
3967impl Default for ParachuteAction {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "Result from PARAM_EXT_SET message."]
3980pub enum ParamAck {
3981    #[doc = "Parameter value ACCEPTED and SET"]
3982    PARAM_ACK_ACCEPTED = 0,
3983    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3984    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3985    #[doc = "Parameter failed to set"]
3986    PARAM_ACK_FAILED = 2,
3987    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3988    PARAM_ACK_IN_PROGRESS = 3,
3989}
3990impl ParamAck {
3991    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3992}
3993impl Default for ParamAck {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3999impl PositionTargetTypemask {
4000    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4001}
4002impl Default for PositionTargetTypemask {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[cfg_attr(feature = "ts", derive(TS))]
4008#[cfg_attr(feature = "ts", ts(export))]
4009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4011#[cfg_attr(feature = "serde", serde(tag = "type"))]
4012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4013#[repr(u32)]
4014#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4015pub enum PrecisionLandMode {
4016    #[doc = "Normal (non-precision) landing."]
4017    PRECISION_LAND_MODE_DISABLED = 0,
4018    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4019    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4020    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4021    PRECISION_LAND_MODE_REQUIRED = 2,
4022}
4023impl PrecisionLandMode {
4024    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4025}
4026impl Default for PrecisionLandMode {
4027    fn default() -> Self {
4028        Self::DEFAULT
4029    }
4030}
4031#[cfg_attr(feature = "ts", derive(TS))]
4032#[cfg_attr(feature = "ts", ts(export))]
4033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4035#[cfg_attr(feature = "serde", serde(tag = "type"))]
4036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4037#[repr(u32)]
4038#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4039pub enum PreflightStorageMissionAction {
4040    #[doc = "Read current mission data from persistent storage"]
4041    MISSION_READ_PERSISTENT = 0,
4042    #[doc = "Write current mission data to persistent storage"]
4043    MISSION_WRITE_PERSISTENT = 1,
4044    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4045    MISSION_RESET_DEFAULT = 2,
4046}
4047impl PreflightStorageMissionAction {
4048    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4049}
4050impl Default for PreflightStorageMissionAction {
4051    fn default() -> Self {
4052        Self::DEFAULT
4053    }
4054}
4055#[cfg_attr(feature = "ts", derive(TS))]
4056#[cfg_attr(feature = "ts", ts(export))]
4057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4059#[cfg_attr(feature = "serde", serde(tag = "type"))]
4060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4061#[repr(u32)]
4062#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4063pub enum PreflightStorageParameterAction {
4064    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4065    PARAM_READ_PERSISTENT = 0,
4066    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4067    PARAM_WRITE_PERSISTENT = 1,
4068    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4069    PARAM_RESET_CONFIG_DEFAULT = 2,
4070    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4071    PARAM_RESET_SENSOR_DEFAULT = 3,
4072    #[doc = "Reset all parameters, including operation counters, to default values"]
4073    PARAM_RESET_ALL_DEFAULT = 4,
4074}
4075impl PreflightStorageParameterAction {
4076    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4077}
4078impl Default for PreflightStorageParameterAction {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4091pub enum RcSubType {
4092    #[doc = "Spektrum DSM2"]
4093    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4094    #[doc = "Spektrum DSMX"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4096    #[doc = "Spektrum DSMX8"]
4097    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4098}
4099impl RcSubType {
4100    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4101}
4102impl Default for RcSubType {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4115pub enum RcType {
4116    #[doc = "Spektrum"]
4117    RC_TYPE_SPEKTRUM = 0,
4118    #[doc = "CRSF"]
4119    RC_TYPE_CRSF = 1,
4120}
4121impl RcType {
4122    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4123}
4124impl Default for RcType {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4137pub enum RebootShutdownConditions {
4138    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4139    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4140    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4141    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4142}
4143impl RebootShutdownConditions {
4144    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4145}
4146impl Default for RebootShutdownConditions {
4147    fn default() -> Self {
4148        Self::DEFAULT
4149    }
4150}
4151#[cfg_attr(feature = "ts", derive(TS))]
4152#[cfg_attr(feature = "ts", ts(export))]
4153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4155#[cfg_attr(feature = "serde", serde(tag = "type"))]
4156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4157#[repr(u32)]
4158#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4159pub enum RtkBaselineCoordinateSystem {
4160    #[doc = "Earth-centered, Earth-fixed"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4162    #[doc = "RTK basestation centered, north, east, down"]
4163    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4164}
4165impl RtkBaselineCoordinateSystem {
4166    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4167}
4168impl Default for RtkBaselineCoordinateSystem {
4169    fn default() -> Self {
4170        Self::DEFAULT
4171    }
4172}
4173#[cfg_attr(feature = "ts", derive(TS))]
4174#[cfg_attr(feature = "ts", ts(export))]
4175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4177#[cfg_attr(feature = "serde", serde(tag = "type"))]
4178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4179#[repr(u32)]
4180#[doc = "Possible safety switch states."]
4181pub enum SafetySwitchState {
4182    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4183    SAFETY_SWITCH_STATE_SAFE = 0,
4184    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4185    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4186}
4187impl SafetySwitchState {
4188    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4189}
4190impl Default for SafetySwitchState {
4191    fn default() -> Self {
4192        Self::DEFAULT
4193    }
4194}
4195#[cfg_attr(feature = "ts", derive(TS))]
4196#[cfg_attr(feature = "ts", ts(export))]
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "SERIAL_CONTROL device types"]
4203pub enum SerialControlDev {
4204    #[doc = "First telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM1 = 0,
4206    #[doc = "Second telemetry port"]
4207    SERIAL_CONTROL_DEV_TELEM2 = 1,
4208    #[doc = "First GPS port"]
4209    SERIAL_CONTROL_DEV_GPS1 = 2,
4210    #[doc = "Second GPS port"]
4211    SERIAL_CONTROL_DEV_GPS2 = 3,
4212    #[doc = "system shell"]
4213    SERIAL_CONTROL_DEV_SHELL = 10,
4214    #[doc = "SERIAL0"]
4215    SERIAL_CONTROL_SERIAL0 = 100,
4216    #[doc = "SERIAL1"]
4217    SERIAL_CONTROL_SERIAL1 = 101,
4218    #[doc = "SERIAL2"]
4219    SERIAL_CONTROL_SERIAL2 = 102,
4220    #[doc = "SERIAL3"]
4221    SERIAL_CONTROL_SERIAL3 = 103,
4222    #[doc = "SERIAL4"]
4223    SERIAL_CONTROL_SERIAL4 = 104,
4224    #[doc = "SERIAL5"]
4225    SERIAL_CONTROL_SERIAL5 = 105,
4226    #[doc = "SERIAL6"]
4227    SERIAL_CONTROL_SERIAL6 = 106,
4228    #[doc = "SERIAL7"]
4229    SERIAL_CONTROL_SERIAL7 = 107,
4230    #[doc = "SERIAL8"]
4231    SERIAL_CONTROL_SERIAL8 = 108,
4232    #[doc = "SERIAL9"]
4233    SERIAL_CONTROL_SERIAL9 = 109,
4234}
4235impl SerialControlDev {
4236    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4237}
4238impl Default for SerialControlDev {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4244impl SerialControlFlag {
4245    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4246}
4247impl Default for SerialControlFlag {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4260pub enum SetFocusType {
4261    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4262    FOCUS_TYPE_STEP = 0,
4263    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4264    FOCUS_TYPE_CONTINUOUS = 1,
4265    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4266    FOCUS_TYPE_RANGE = 2,
4267    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4268    FOCUS_TYPE_METERS = 3,
4269    #[doc = "Focus automatically."]
4270    FOCUS_TYPE_AUTO = 4,
4271    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4272    FOCUS_TYPE_AUTO_SINGLE = 5,
4273    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4274    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4275}
4276impl SetFocusType {
4277    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4278}
4279impl Default for SetFocusType {
4280    fn default() -> Self {
4281        Self::DEFAULT
4282    }
4283}
4284#[cfg_attr(feature = "ts", derive(TS))]
4285#[cfg_attr(feature = "ts", ts(export))]
4286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4288#[cfg_attr(feature = "serde", serde(tag = "type"))]
4289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4290#[repr(u32)]
4291#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4292pub enum SpeedType {
4293    #[doc = "Airspeed"]
4294    SPEED_TYPE_AIRSPEED = 0,
4295    #[doc = "Groundspeed"]
4296    SPEED_TYPE_GROUNDSPEED = 1,
4297    #[doc = "Climb speed"]
4298    SPEED_TYPE_CLIMB_SPEED = 2,
4299    #[doc = "Descent speed"]
4300    SPEED_TYPE_DESCENT_SPEED = 3,
4301}
4302impl SpeedType {
4303    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4304}
4305impl Default for SpeedType {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[cfg_attr(feature = "ts", derive(TS))]
4311#[cfg_attr(feature = "ts", ts(export))]
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "Flags to indicate the status of camera storage."]
4318pub enum StorageStatus {
4319    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4320    STORAGE_STATUS_EMPTY = 0,
4321    #[doc = "Storage present but unformatted."]
4322    STORAGE_STATUS_UNFORMATTED = 1,
4323    #[doc = "Storage present and ready."]
4324    STORAGE_STATUS_READY = 2,
4325    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4326    STORAGE_STATUS_NOT_SUPPORTED = 3,
4327}
4328impl StorageStatus {
4329    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4330}
4331impl Default for StorageStatus {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Flags to indicate the type of storage."]
4344pub enum StorageType {
4345    #[doc = "Storage type is not known."]
4346    STORAGE_TYPE_UNKNOWN = 0,
4347    #[doc = "Storage type is USB device."]
4348    STORAGE_TYPE_USB_STICK = 1,
4349    #[doc = "Storage type is SD card."]
4350    STORAGE_TYPE_SD = 2,
4351    #[doc = "Storage type is microSD card."]
4352    STORAGE_TYPE_MICROSD = 3,
4353    #[doc = "Storage type is CFast."]
4354    STORAGE_TYPE_CF = 4,
4355    #[doc = "Storage type is CFexpress."]
4356    STORAGE_TYPE_CFE = 5,
4357    #[doc = "Storage type is XQD."]
4358    STORAGE_TYPE_XQD = 6,
4359    #[doc = "Storage type is HD mass storage type."]
4360    STORAGE_TYPE_HD = 7,
4361    #[doc = "Storage type is other, not listed type."]
4362    STORAGE_TYPE_OTHER = 254,
4363}
4364impl StorageType {
4365    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4366}
4367impl Default for StorageType {
4368    fn default() -> Self {
4369        Self::DEFAULT
4370    }
4371}
4372bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4373impl StorageUsageFlag {
4374    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4375}
4376impl Default for StorageUsageFlag {
4377    fn default() -> Self {
4378        Self::DEFAULT
4379    }
4380}
4381#[cfg_attr(feature = "ts", derive(TS))]
4382#[cfg_attr(feature = "ts", ts(export))]
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4389pub enum TuneFormat {
4390    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4391    TUNE_FORMAT_QBASIC1_1 = 1,
4392    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4393    TUNE_FORMAT_MML_MODERN = 2,
4394}
4395impl TuneFormat {
4396    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4397}
4398impl Default for TuneFormat {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[cfg_attr(feature = "ts", derive(TS))]
4404#[cfg_attr(feature = "ts", ts(export))]
4405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4407#[cfg_attr(feature = "serde", serde(tag = "type"))]
4408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4409#[repr(u32)]
4410#[doc = "Generalized UAVCAN node health"]
4411pub enum UavcanNodeHealth {
4412    #[doc = "The node is functioning properly."]
4413    UAVCAN_NODE_HEALTH_OK = 0,
4414    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4415    UAVCAN_NODE_HEALTH_WARNING = 1,
4416    #[doc = "The node has encountered a major failure."]
4417    UAVCAN_NODE_HEALTH_ERROR = 2,
4418    #[doc = "The node has suffered a fatal malfunction."]
4419    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4420}
4421impl UavcanNodeHealth {
4422    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4423}
4424impl Default for UavcanNodeHealth {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429#[cfg_attr(feature = "ts", derive(TS))]
4430#[cfg_attr(feature = "ts", ts(export))]
4431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4433#[cfg_attr(feature = "serde", serde(tag = "type"))]
4434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4435#[repr(u32)]
4436#[doc = "Generalized UAVCAN node mode"]
4437pub enum UavcanNodeMode {
4438    #[doc = "The node is performing its primary functions."]
4439    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4440    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4441    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4442    #[doc = "The node is under maintenance."]
4443    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4444    #[doc = "The node is in the process of updating its software."]
4445    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4446    #[doc = "The node is no longer available online."]
4447    UAVCAN_NODE_MODE_OFFLINE = 7,
4448}
4449impl UavcanNodeMode {
4450    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4451}
4452impl Default for UavcanNodeMode {
4453    fn default() -> Self {
4454        Self::DEFAULT
4455    }
4456}
4457bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4458impl UtmDataAvailFlags {
4459    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4460}
4461impl Default for UtmDataAvailFlags {
4462    fn default() -> Self {
4463        Self::DEFAULT
4464    }
4465}
4466#[cfg_attr(feature = "ts", derive(TS))]
4467#[cfg_attr(feature = "ts", ts(export))]
4468#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "serde", serde(tag = "type"))]
4471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4472#[repr(u32)]
4473#[doc = "Airborne status of UAS."]
4474pub enum UtmFlightState {
4475    #[doc = "The flight state can't be determined."]
4476    UTM_FLIGHT_STATE_UNKNOWN = 1,
4477    #[doc = "UAS on ground."]
4478    UTM_FLIGHT_STATE_GROUND = 2,
4479    #[doc = "UAS airborne."]
4480    UTM_FLIGHT_STATE_AIRBORNE = 3,
4481    #[doc = "UAS is in an emergency flight state."]
4482    UTM_FLIGHT_STATE_EMERGENCY = 16,
4483    #[doc = "UAS has no active controls."]
4484    UTM_FLIGHT_STATE_NOCTRL = 32,
4485}
4486impl UtmFlightState {
4487    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4488}
4489impl Default for UtmFlightState {
4490    fn default() -> Self {
4491        Self::DEFAULT
4492    }
4493}
4494#[cfg_attr(feature = "ts", derive(TS))]
4495#[cfg_attr(feature = "ts", ts(export))]
4496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4498#[cfg_attr(feature = "serde", serde(tag = "type"))]
4499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4500#[repr(u32)]
4501#[doc = "Video stream encodings"]
4502pub enum VideoStreamEncoding {
4503    #[doc = "Stream encoding is unknown"]
4504    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4505    #[doc = "Stream encoding is H.264"]
4506    VIDEO_STREAM_ENCODING_H264 = 1,
4507    #[doc = "Stream encoding is H.265"]
4508    VIDEO_STREAM_ENCODING_H265 = 2,
4509}
4510impl VideoStreamEncoding {
4511    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4512}
4513impl Default for VideoStreamEncoding {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4519impl VideoStreamStatusFlags {
4520    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4521}
4522impl Default for VideoStreamStatusFlags {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527#[cfg_attr(feature = "ts", derive(TS))]
4528#[cfg_attr(feature = "ts", ts(export))]
4529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4531#[cfg_attr(feature = "serde", serde(tag = "type"))]
4532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4533#[repr(u32)]
4534#[doc = "Video stream types"]
4535pub enum VideoStreamType {
4536    #[doc = "Stream is RTSP"]
4537    VIDEO_STREAM_TYPE_RTSP = 0,
4538    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4539    VIDEO_STREAM_TYPE_RTPUDP = 1,
4540    #[doc = "Stream is MPEG on TCP"]
4541    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4542    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4543    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4544}
4545impl VideoStreamType {
4546    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4547}
4548impl Default for VideoStreamType {
4549    fn default() -> Self {
4550        Self::DEFAULT
4551    }
4552}
4553#[cfg_attr(feature = "ts", derive(TS))]
4554#[cfg_attr(feature = "ts", ts(export))]
4555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4557#[cfg_attr(feature = "serde", serde(tag = "type"))]
4558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4559#[repr(u32)]
4560#[doc = "Direction of VTOL transition"]
4561pub enum VtolTransitionHeading {
4562    #[doc = "Respect the heading configuration of the vehicle."]
4563    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4564    #[doc = "Use the heading pointing towards the next waypoint."]
4565    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4566    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4567    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4568    #[doc = "Use the specified heading in parameter 4."]
4569    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4570    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4571    VTOL_TRANSITION_HEADING_ANY = 4,
4572}
4573impl VtolTransitionHeading {
4574    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4575}
4576impl Default for VtolTransitionHeading {
4577    fn default() -> Self {
4578        Self::DEFAULT
4579    }
4580}
4581#[cfg_attr(feature = "ts", derive(TS))]
4582#[cfg_attr(feature = "ts", ts(export))]
4583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4585#[cfg_attr(feature = "serde", serde(tag = "type"))]
4586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4587#[repr(u32)]
4588#[doc = "WiFi Mode."]
4589pub enum WifiConfigApMode {
4590    #[doc = "WiFi mode is undefined."]
4591    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4592    #[doc = "WiFi configured as an access point."]
4593    WIFI_CONFIG_AP_MODE_AP = 1,
4594    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4595    WIFI_CONFIG_AP_MODE_STATION = 2,
4596    #[doc = "WiFi disabled."]
4597    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4598}
4599impl WifiConfigApMode {
4600    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4601}
4602impl Default for WifiConfigApMode {
4603    fn default() -> Self {
4604        Self::DEFAULT
4605    }
4606}
4607#[cfg_attr(feature = "ts", derive(TS))]
4608#[cfg_attr(feature = "ts", ts(export))]
4609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4611#[cfg_attr(feature = "serde", serde(tag = "type"))]
4612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4613#[repr(u32)]
4614#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4615pub enum WifiConfigApResponse {
4616    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4617    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4618    #[doc = "Changes accepted."]
4619    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4620    #[doc = "Changes rejected."]
4621    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4622    #[doc = "Invalid Mode."]
4623    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4624    #[doc = "Invalid SSID."]
4625    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4626    #[doc = "Invalid Password."]
4627    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4628}
4629impl WifiConfigApResponse {
4630    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4631}
4632impl Default for WifiConfigApResponse {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Winch actions."]
4645pub enum WinchActions {
4646    #[doc = "Allow motor to freewheel."]
4647    WINCH_RELAXED = 0,
4648    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4649    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4650    #[doc = "Wind or unwind line at specified rate."]
4651    WINCH_RATE_CONTROL = 2,
4652    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_LOCK = 3,
4654    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_DELIVER = 4,
4656    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_HOLD = 5,
4658    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_RETRACT = 6,
4660    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_LOAD_LINE = 7,
4662    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4663    WINCH_ABANDON_LINE = 8,
4664    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4665    WINCH_LOAD_PAYLOAD = 9,
4666}
4667impl WinchActions {
4668    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4669}
4670impl Default for WinchActions {
4671    fn default() -> Self {
4672        Self::DEFAULT
4673    }
4674}
4675#[doc = "Set the vehicle attitude and body angular rates."]
4676#[doc = ""]
4677#[doc = "ID: 140"]
4678#[derive(Debug, Clone, PartialEq)]
4679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4681#[cfg_attr(feature = "ts", derive(TS))]
4682#[cfg_attr(feature = "ts", ts(export))]
4683pub struct ACTUATOR_CONTROL_TARGET_DATA {
4684    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4685    pub time_usec: u64,
4686    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4689    pub controls: [f32; 8],
4690    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4691    pub group_mlx: u8,
4692}
4693impl ACTUATOR_CONTROL_TARGET_DATA {
4694    pub const ENCODED_LEN: usize = 41usize;
4695    pub const DEFAULT: Self = Self {
4696        time_usec: 0_u64,
4697        controls: [0.0_f32; 8usize],
4698        group_mlx: 0_u8,
4699    };
4700    #[cfg(feature = "arbitrary")]
4701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4702        use arbitrary::{Arbitrary, Unstructured};
4703        let mut buf = [0u8; 1024];
4704        rng.fill_bytes(&mut buf);
4705        let mut unstructured = Unstructured::new(&buf);
4706        Self::arbitrary(&mut unstructured).unwrap_or_default()
4707    }
4708}
4709impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4710    fn default() -> Self {
4711        Self::DEFAULT.clone()
4712    }
4713}
4714impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4715    type Message = MavMessage;
4716    const ID: u32 = 140u32;
4717    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4718    const EXTRA_CRC: u8 = 181u8;
4719    const ENCODED_LEN: usize = 41usize;
4720    fn deser(
4721        _version: MavlinkVersion,
4722        __input: &[u8],
4723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4724        let avail_len = __input.len();
4725        let mut payload_buf = [0; Self::ENCODED_LEN];
4726        let mut buf = if avail_len < Self::ENCODED_LEN {
4727            payload_buf[0..avail_len].copy_from_slice(__input);
4728            Bytes::new(&payload_buf)
4729        } else {
4730            Bytes::new(__input)
4731        };
4732        let mut __struct = Self::default();
4733        __struct.time_usec = buf.get_u64_le();
4734        for v in &mut __struct.controls {
4735            let val = buf.get_f32_le();
4736            *v = val;
4737        }
4738        __struct.group_mlx = buf.get_u8();
4739        Ok(__struct)
4740    }
4741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4742        let mut __tmp = BytesMut::new(bytes);
4743        #[allow(clippy::absurd_extreme_comparisons)]
4744        #[allow(unused_comparisons)]
4745        if __tmp.remaining() < Self::ENCODED_LEN {
4746            panic!(
4747                "buffer is too small (need {} bytes, but got {})",
4748                Self::ENCODED_LEN,
4749                __tmp.remaining(),
4750            )
4751        }
4752        __tmp.put_u64_le(self.time_usec);
4753        for val in &self.controls {
4754            __tmp.put_f32_le(*val);
4755        }
4756        __tmp.put_u8(self.group_mlx);
4757        if matches!(version, MavlinkVersion::V2) {
4758            let len = __tmp.len();
4759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4760        } else {
4761            __tmp.len()
4762        }
4763    }
4764}
4765#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4766#[doc = ""]
4767#[doc = "ID: 375"]
4768#[derive(Debug, Clone, PartialEq)]
4769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4771#[cfg_attr(feature = "ts", derive(TS))]
4772#[cfg_attr(feature = "ts", ts(export))]
4773pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4774    #[doc = "Timestamp (since system boot)."]
4775    pub time_usec: u64,
4776    #[doc = "Active outputs"]
4777    pub active: u32,
4778    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4781    pub actuator: [f32; 32],
4782}
4783impl ACTUATOR_OUTPUT_STATUS_DATA {
4784    pub const ENCODED_LEN: usize = 140usize;
4785    pub const DEFAULT: Self = Self {
4786        time_usec: 0_u64,
4787        active: 0_u32,
4788        actuator: [0.0_f32; 32usize],
4789    };
4790    #[cfg(feature = "arbitrary")]
4791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4792        use arbitrary::{Arbitrary, Unstructured};
4793        let mut buf = [0u8; 1024];
4794        rng.fill_bytes(&mut buf);
4795        let mut unstructured = Unstructured::new(&buf);
4796        Self::arbitrary(&mut unstructured).unwrap_or_default()
4797    }
4798}
4799impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4800    fn default() -> Self {
4801        Self::DEFAULT.clone()
4802    }
4803}
4804impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4805    type Message = MavMessage;
4806    const ID: u32 = 375u32;
4807    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4808    const EXTRA_CRC: u8 = 251u8;
4809    const ENCODED_LEN: usize = 140usize;
4810    fn deser(
4811        _version: MavlinkVersion,
4812        __input: &[u8],
4813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4814        let avail_len = __input.len();
4815        let mut payload_buf = [0; Self::ENCODED_LEN];
4816        let mut buf = if avail_len < Self::ENCODED_LEN {
4817            payload_buf[0..avail_len].copy_from_slice(__input);
4818            Bytes::new(&payload_buf)
4819        } else {
4820            Bytes::new(__input)
4821        };
4822        let mut __struct = Self::default();
4823        __struct.time_usec = buf.get_u64_le();
4824        __struct.active = buf.get_u32_le();
4825        for v in &mut __struct.actuator {
4826            let val = buf.get_f32_le();
4827            *v = val;
4828        }
4829        Ok(__struct)
4830    }
4831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4832        let mut __tmp = BytesMut::new(bytes);
4833        #[allow(clippy::absurd_extreme_comparisons)]
4834        #[allow(unused_comparisons)]
4835        if __tmp.remaining() < Self::ENCODED_LEN {
4836            panic!(
4837                "buffer is too small (need {} bytes, but got {})",
4838                Self::ENCODED_LEN,
4839                __tmp.remaining(),
4840            )
4841        }
4842        __tmp.put_u64_le(self.time_usec);
4843        __tmp.put_u32_le(self.active);
4844        for val in &self.actuator {
4845            __tmp.put_f32_le(*val);
4846        }
4847        if matches!(version, MavlinkVersion::V2) {
4848            let len = __tmp.len();
4849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4850        } else {
4851            __tmp.len()
4852        }
4853    }
4854}
4855#[doc = "The location and information of an ADSB vehicle."]
4856#[doc = ""]
4857#[doc = "ID: 246"]
4858#[derive(Debug, Clone, PartialEq)]
4859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4861#[cfg_attr(feature = "ts", derive(TS))]
4862#[cfg_attr(feature = "ts", ts(export))]
4863pub struct ADSB_VEHICLE_DATA {
4864    #[doc = "ICAO address"]
4865    pub ICAO_address: u32,
4866    #[doc = "Latitude"]
4867    pub lat: i32,
4868    #[doc = "Longitude"]
4869    pub lon: i32,
4870    #[doc = "Altitude(ASL)"]
4871    pub altitude: i32,
4872    #[doc = "Course over ground"]
4873    pub heading: u16,
4874    #[doc = "The horizontal velocity"]
4875    pub hor_velocity: u16,
4876    #[doc = "The vertical velocity. Positive is up"]
4877    pub ver_velocity: i16,
4878    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4879    pub flags: AdsbFlags,
4880    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4881    pub squawk: u16,
4882    #[doc = "ADSB altitude type."]
4883    pub altitude_type: AdsbAltitudeType,
4884    #[doc = "The callsign, 8+null"]
4885    #[cfg_attr(feature = "ts", ts(type = "string"))]
4886    pub callsign: CharArray<9>,
4887    #[doc = "ADSB emitter type."]
4888    pub emitter_type: AdsbEmitterType,
4889    #[doc = "Time since last communication in seconds"]
4890    pub tslc: u8,
4891}
4892impl ADSB_VEHICLE_DATA {
4893    pub const ENCODED_LEN: usize = 38usize;
4894    pub const DEFAULT: Self = Self {
4895        ICAO_address: 0_u32,
4896        lat: 0_i32,
4897        lon: 0_i32,
4898        altitude: 0_i32,
4899        heading: 0_u16,
4900        hor_velocity: 0_u16,
4901        ver_velocity: 0_i16,
4902        flags: AdsbFlags::DEFAULT,
4903        squawk: 0_u16,
4904        altitude_type: AdsbAltitudeType::DEFAULT,
4905        callsign: CharArray::new([0_u8; 9usize]),
4906        emitter_type: AdsbEmitterType::DEFAULT,
4907        tslc: 0_u8,
4908    };
4909    #[cfg(feature = "arbitrary")]
4910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4911        use arbitrary::{Arbitrary, Unstructured};
4912        let mut buf = [0u8; 1024];
4913        rng.fill_bytes(&mut buf);
4914        let mut unstructured = Unstructured::new(&buf);
4915        Self::arbitrary(&mut unstructured).unwrap_or_default()
4916    }
4917}
4918impl Default for ADSB_VEHICLE_DATA {
4919    fn default() -> Self {
4920        Self::DEFAULT.clone()
4921    }
4922}
4923impl MessageData for ADSB_VEHICLE_DATA {
4924    type Message = MavMessage;
4925    const ID: u32 = 246u32;
4926    const NAME: &'static str = "ADSB_VEHICLE";
4927    const EXTRA_CRC: u8 = 184u8;
4928    const ENCODED_LEN: usize = 38usize;
4929    fn deser(
4930        _version: MavlinkVersion,
4931        __input: &[u8],
4932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4933        let avail_len = __input.len();
4934        let mut payload_buf = [0; Self::ENCODED_LEN];
4935        let mut buf = if avail_len < Self::ENCODED_LEN {
4936            payload_buf[0..avail_len].copy_from_slice(__input);
4937            Bytes::new(&payload_buf)
4938        } else {
4939            Bytes::new(__input)
4940        };
4941        let mut __struct = Self::default();
4942        __struct.ICAO_address = buf.get_u32_le();
4943        __struct.lat = buf.get_i32_le();
4944        __struct.lon = buf.get_i32_le();
4945        __struct.altitude = buf.get_i32_le();
4946        __struct.heading = buf.get_u16_le();
4947        __struct.hor_velocity = buf.get_u16_le();
4948        __struct.ver_velocity = buf.get_i16_le();
4949        let tmp = buf.get_u16_le();
4950        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
4951            ::mavlink_core::error::ParserError::InvalidFlag {
4952                flag_type: "AdsbFlags",
4953                value: tmp as u64,
4954            },
4955        )?;
4956        __struct.squawk = buf.get_u16_le();
4957        let tmp = buf.get_u8();
4958        __struct.altitude_type =
4959            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4960                enum_type: "AdsbAltitudeType",
4961                value: tmp as u64,
4962            })?;
4963        let mut tmp = [0_u8; 9usize];
4964        for v in &mut tmp {
4965            *v = buf.get_u8();
4966        }
4967        __struct.callsign = CharArray::new(tmp);
4968        let tmp = buf.get_u8();
4969        __struct.emitter_type =
4970            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4971                enum_type: "AdsbEmitterType",
4972                value: tmp as u64,
4973            })?;
4974        __struct.tslc = buf.get_u8();
4975        Ok(__struct)
4976    }
4977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4978        let mut __tmp = BytesMut::new(bytes);
4979        #[allow(clippy::absurd_extreme_comparisons)]
4980        #[allow(unused_comparisons)]
4981        if __tmp.remaining() < Self::ENCODED_LEN {
4982            panic!(
4983                "buffer is too small (need {} bytes, but got {})",
4984                Self::ENCODED_LEN,
4985                __tmp.remaining(),
4986            )
4987        }
4988        __tmp.put_u32_le(self.ICAO_address);
4989        __tmp.put_i32_le(self.lat);
4990        __tmp.put_i32_le(self.lon);
4991        __tmp.put_i32_le(self.altitude);
4992        __tmp.put_u16_le(self.heading);
4993        __tmp.put_u16_le(self.hor_velocity);
4994        __tmp.put_i16_le(self.ver_velocity);
4995        __tmp.put_u16_le(self.flags.bits() as u16);
4996        __tmp.put_u16_le(self.squawk);
4997        __tmp.put_u8(self.altitude_type as u8);
4998        for val in &self.callsign {
4999            __tmp.put_u8(*val);
5000        }
5001        __tmp.put_u8(self.emitter_type as u8);
5002        __tmp.put_u8(self.tslc);
5003        if matches!(version, MavlinkVersion::V2) {
5004            let len = __tmp.len();
5005            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5006        } else {
5007            __tmp.len()
5008        }
5009    }
5010}
5011#[doc = "The location and information of an AIS vessel."]
5012#[doc = ""]
5013#[doc = "ID: 301"]
5014#[derive(Debug, Clone, PartialEq)]
5015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5017#[cfg_attr(feature = "ts", derive(TS))]
5018#[cfg_attr(feature = "ts", ts(export))]
5019pub struct AIS_VESSEL_DATA {
5020    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5021    pub MMSI: u32,
5022    #[doc = "Latitude"]
5023    pub lat: i32,
5024    #[doc = "Longitude"]
5025    pub lon: i32,
5026    #[doc = "Course over ground"]
5027    pub COG: u16,
5028    #[doc = "True heading"]
5029    pub heading: u16,
5030    #[doc = "Speed over ground"]
5031    pub velocity: u16,
5032    #[doc = "Distance from lat/lon location to bow"]
5033    pub dimension_bow: u16,
5034    #[doc = "Distance from lat/lon location to stern"]
5035    pub dimension_stern: u16,
5036    #[doc = "Time since last communication in seconds"]
5037    pub tslc: u16,
5038    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5039    pub flags: AisFlags,
5040    #[doc = "Turn rate"]
5041    pub turn_rate: i8,
5042    #[doc = "Navigational status"]
5043    pub navigational_status: AisNavStatus,
5044    #[doc = "Type of vessels"]
5045    pub mavtype: AisType,
5046    #[doc = "Distance from lat/lon location to port side"]
5047    pub dimension_port: u8,
5048    #[doc = "Distance from lat/lon location to starboard side"]
5049    pub dimension_starboard: u8,
5050    #[doc = "The vessel callsign"]
5051    #[cfg_attr(feature = "ts", ts(type = "string"))]
5052    pub callsign: CharArray<7>,
5053    #[doc = "The vessel name"]
5054    #[cfg_attr(feature = "ts", ts(type = "string"))]
5055    pub name: CharArray<20>,
5056}
5057impl AIS_VESSEL_DATA {
5058    pub const ENCODED_LEN: usize = 58usize;
5059    pub const DEFAULT: Self = Self {
5060        MMSI: 0_u32,
5061        lat: 0_i32,
5062        lon: 0_i32,
5063        COG: 0_u16,
5064        heading: 0_u16,
5065        velocity: 0_u16,
5066        dimension_bow: 0_u16,
5067        dimension_stern: 0_u16,
5068        tslc: 0_u16,
5069        flags: AisFlags::DEFAULT,
5070        turn_rate: 0_i8,
5071        navigational_status: AisNavStatus::DEFAULT,
5072        mavtype: AisType::DEFAULT,
5073        dimension_port: 0_u8,
5074        dimension_starboard: 0_u8,
5075        callsign: CharArray::new([0_u8; 7usize]),
5076        name: CharArray::new([0_u8; 20usize]),
5077    };
5078    #[cfg(feature = "arbitrary")]
5079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5080        use arbitrary::{Arbitrary, Unstructured};
5081        let mut buf = [0u8; 1024];
5082        rng.fill_bytes(&mut buf);
5083        let mut unstructured = Unstructured::new(&buf);
5084        Self::arbitrary(&mut unstructured).unwrap_or_default()
5085    }
5086}
5087impl Default for AIS_VESSEL_DATA {
5088    fn default() -> Self {
5089        Self::DEFAULT.clone()
5090    }
5091}
5092impl MessageData for AIS_VESSEL_DATA {
5093    type Message = MavMessage;
5094    const ID: u32 = 301u32;
5095    const NAME: &'static str = "AIS_VESSEL";
5096    const EXTRA_CRC: u8 = 243u8;
5097    const ENCODED_LEN: usize = 58usize;
5098    fn deser(
5099        _version: MavlinkVersion,
5100        __input: &[u8],
5101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5102        let avail_len = __input.len();
5103        let mut payload_buf = [0; Self::ENCODED_LEN];
5104        let mut buf = if avail_len < Self::ENCODED_LEN {
5105            payload_buf[0..avail_len].copy_from_slice(__input);
5106            Bytes::new(&payload_buf)
5107        } else {
5108            Bytes::new(__input)
5109        };
5110        let mut __struct = Self::default();
5111        __struct.MMSI = buf.get_u32_le();
5112        __struct.lat = buf.get_i32_le();
5113        __struct.lon = buf.get_i32_le();
5114        __struct.COG = buf.get_u16_le();
5115        __struct.heading = buf.get_u16_le();
5116        __struct.velocity = buf.get_u16_le();
5117        __struct.dimension_bow = buf.get_u16_le();
5118        __struct.dimension_stern = buf.get_u16_le();
5119        __struct.tslc = buf.get_u16_le();
5120        let tmp = buf.get_u16_le();
5121        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5122            ::mavlink_core::error::ParserError::InvalidFlag {
5123                flag_type: "AisFlags",
5124                value: tmp as u64,
5125            },
5126        )?;
5127        __struct.turn_rate = buf.get_i8();
5128        let tmp = buf.get_u8();
5129        __struct.navigational_status =
5130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5131                enum_type: "AisNavStatus",
5132                value: tmp as u64,
5133            })?;
5134        let tmp = buf.get_u8();
5135        __struct.mavtype =
5136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5137                enum_type: "AisType",
5138                value: tmp as u64,
5139            })?;
5140        __struct.dimension_port = buf.get_u8();
5141        __struct.dimension_starboard = buf.get_u8();
5142        let mut tmp = [0_u8; 7usize];
5143        for v in &mut tmp {
5144            *v = buf.get_u8();
5145        }
5146        __struct.callsign = CharArray::new(tmp);
5147        let mut tmp = [0_u8; 20usize];
5148        for v in &mut tmp {
5149            *v = buf.get_u8();
5150        }
5151        __struct.name = CharArray::new(tmp);
5152        Ok(__struct)
5153    }
5154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5155        let mut __tmp = BytesMut::new(bytes);
5156        #[allow(clippy::absurd_extreme_comparisons)]
5157        #[allow(unused_comparisons)]
5158        if __tmp.remaining() < Self::ENCODED_LEN {
5159            panic!(
5160                "buffer is too small (need {} bytes, but got {})",
5161                Self::ENCODED_LEN,
5162                __tmp.remaining(),
5163            )
5164        }
5165        __tmp.put_u32_le(self.MMSI);
5166        __tmp.put_i32_le(self.lat);
5167        __tmp.put_i32_le(self.lon);
5168        __tmp.put_u16_le(self.COG);
5169        __tmp.put_u16_le(self.heading);
5170        __tmp.put_u16_le(self.velocity);
5171        __tmp.put_u16_le(self.dimension_bow);
5172        __tmp.put_u16_le(self.dimension_stern);
5173        __tmp.put_u16_le(self.tslc);
5174        __tmp.put_u16_le(self.flags.bits() as u16);
5175        __tmp.put_i8(self.turn_rate);
5176        __tmp.put_u8(self.navigational_status as u8);
5177        __tmp.put_u8(self.mavtype as u8);
5178        __tmp.put_u8(self.dimension_port);
5179        __tmp.put_u8(self.dimension_starboard);
5180        for val in &self.callsign {
5181            __tmp.put_u8(*val);
5182        }
5183        for val in &self.name {
5184            __tmp.put_u8(*val);
5185        }
5186        if matches!(version, MavlinkVersion::V2) {
5187            let len = __tmp.len();
5188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5189        } else {
5190            __tmp.len()
5191        }
5192    }
5193}
5194#[doc = "The current system altitude."]
5195#[doc = ""]
5196#[doc = "ID: 141"]
5197#[derive(Debug, Clone, PartialEq)]
5198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5200#[cfg_attr(feature = "ts", derive(TS))]
5201#[cfg_attr(feature = "ts", ts(export))]
5202pub struct ALTITUDE_DATA {
5203    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5204    pub time_usec: u64,
5205    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5206    pub altitude_monotonic: f32,
5207    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5208    pub altitude_amsl: f32,
5209    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5210    pub altitude_local: f32,
5211    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5212    pub altitude_relative: f32,
5213    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5214    pub altitude_terrain: f32,
5215    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5216    pub bottom_clearance: f32,
5217}
5218impl ALTITUDE_DATA {
5219    pub const ENCODED_LEN: usize = 32usize;
5220    pub const DEFAULT: Self = Self {
5221        time_usec: 0_u64,
5222        altitude_monotonic: 0.0_f32,
5223        altitude_amsl: 0.0_f32,
5224        altitude_local: 0.0_f32,
5225        altitude_relative: 0.0_f32,
5226        altitude_terrain: 0.0_f32,
5227        bottom_clearance: 0.0_f32,
5228    };
5229    #[cfg(feature = "arbitrary")]
5230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5231        use arbitrary::{Arbitrary, Unstructured};
5232        let mut buf = [0u8; 1024];
5233        rng.fill_bytes(&mut buf);
5234        let mut unstructured = Unstructured::new(&buf);
5235        Self::arbitrary(&mut unstructured).unwrap_or_default()
5236    }
5237}
5238impl Default for ALTITUDE_DATA {
5239    fn default() -> Self {
5240        Self::DEFAULT.clone()
5241    }
5242}
5243impl MessageData for ALTITUDE_DATA {
5244    type Message = MavMessage;
5245    const ID: u32 = 141u32;
5246    const NAME: &'static str = "ALTITUDE";
5247    const EXTRA_CRC: u8 = 47u8;
5248    const ENCODED_LEN: usize = 32usize;
5249    fn deser(
5250        _version: MavlinkVersion,
5251        __input: &[u8],
5252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5253        let avail_len = __input.len();
5254        let mut payload_buf = [0; Self::ENCODED_LEN];
5255        let mut buf = if avail_len < Self::ENCODED_LEN {
5256            payload_buf[0..avail_len].copy_from_slice(__input);
5257            Bytes::new(&payload_buf)
5258        } else {
5259            Bytes::new(__input)
5260        };
5261        let mut __struct = Self::default();
5262        __struct.time_usec = buf.get_u64_le();
5263        __struct.altitude_monotonic = buf.get_f32_le();
5264        __struct.altitude_amsl = buf.get_f32_le();
5265        __struct.altitude_local = buf.get_f32_le();
5266        __struct.altitude_relative = buf.get_f32_le();
5267        __struct.altitude_terrain = buf.get_f32_le();
5268        __struct.bottom_clearance = buf.get_f32_le();
5269        Ok(__struct)
5270    }
5271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5272        let mut __tmp = BytesMut::new(bytes);
5273        #[allow(clippy::absurd_extreme_comparisons)]
5274        #[allow(unused_comparisons)]
5275        if __tmp.remaining() < Self::ENCODED_LEN {
5276            panic!(
5277                "buffer is too small (need {} bytes, but got {})",
5278                Self::ENCODED_LEN,
5279                __tmp.remaining(),
5280            )
5281        }
5282        __tmp.put_u64_le(self.time_usec);
5283        __tmp.put_f32_le(self.altitude_monotonic);
5284        __tmp.put_f32_le(self.altitude_amsl);
5285        __tmp.put_f32_le(self.altitude_local);
5286        __tmp.put_f32_le(self.altitude_relative);
5287        __tmp.put_f32_le(self.altitude_terrain);
5288        __tmp.put_f32_le(self.bottom_clearance);
5289        if matches!(version, MavlinkVersion::V2) {
5290            let len = __tmp.len();
5291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5292        } else {
5293            __tmp.len()
5294        }
5295    }
5296}
5297#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5298#[doc = ""]
5299#[doc = "ID: 30"]
5300#[derive(Debug, Clone, PartialEq)]
5301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5303#[cfg_attr(feature = "ts", derive(TS))]
5304#[cfg_attr(feature = "ts", ts(export))]
5305pub struct ATTITUDE_DATA {
5306    #[doc = "Timestamp (time since system boot)."]
5307    pub time_boot_ms: u32,
5308    #[doc = "Roll angle (-pi..+pi)"]
5309    pub roll: f32,
5310    #[doc = "Pitch angle (-pi..+pi)"]
5311    pub pitch: f32,
5312    #[doc = "Yaw angle (-pi..+pi)"]
5313    pub yaw: f32,
5314    #[doc = "Roll angular speed"]
5315    pub rollspeed: f32,
5316    #[doc = "Pitch angular speed"]
5317    pub pitchspeed: f32,
5318    #[doc = "Yaw angular speed"]
5319    pub yawspeed: f32,
5320}
5321impl ATTITUDE_DATA {
5322    pub const ENCODED_LEN: usize = 28usize;
5323    pub const DEFAULT: Self = Self {
5324        time_boot_ms: 0_u32,
5325        roll: 0.0_f32,
5326        pitch: 0.0_f32,
5327        yaw: 0.0_f32,
5328        rollspeed: 0.0_f32,
5329        pitchspeed: 0.0_f32,
5330        yawspeed: 0.0_f32,
5331    };
5332    #[cfg(feature = "arbitrary")]
5333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5334        use arbitrary::{Arbitrary, Unstructured};
5335        let mut buf = [0u8; 1024];
5336        rng.fill_bytes(&mut buf);
5337        let mut unstructured = Unstructured::new(&buf);
5338        Self::arbitrary(&mut unstructured).unwrap_or_default()
5339    }
5340}
5341impl Default for ATTITUDE_DATA {
5342    fn default() -> Self {
5343        Self::DEFAULT.clone()
5344    }
5345}
5346impl MessageData for ATTITUDE_DATA {
5347    type Message = MavMessage;
5348    const ID: u32 = 30u32;
5349    const NAME: &'static str = "ATTITUDE";
5350    const EXTRA_CRC: u8 = 39u8;
5351    const ENCODED_LEN: usize = 28usize;
5352    fn deser(
5353        _version: MavlinkVersion,
5354        __input: &[u8],
5355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5356        let avail_len = __input.len();
5357        let mut payload_buf = [0; Self::ENCODED_LEN];
5358        let mut buf = if avail_len < Self::ENCODED_LEN {
5359            payload_buf[0..avail_len].copy_from_slice(__input);
5360            Bytes::new(&payload_buf)
5361        } else {
5362            Bytes::new(__input)
5363        };
5364        let mut __struct = Self::default();
5365        __struct.time_boot_ms = buf.get_u32_le();
5366        __struct.roll = buf.get_f32_le();
5367        __struct.pitch = buf.get_f32_le();
5368        __struct.yaw = buf.get_f32_le();
5369        __struct.rollspeed = buf.get_f32_le();
5370        __struct.pitchspeed = buf.get_f32_le();
5371        __struct.yawspeed = buf.get_f32_le();
5372        Ok(__struct)
5373    }
5374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5375        let mut __tmp = BytesMut::new(bytes);
5376        #[allow(clippy::absurd_extreme_comparisons)]
5377        #[allow(unused_comparisons)]
5378        if __tmp.remaining() < Self::ENCODED_LEN {
5379            panic!(
5380                "buffer is too small (need {} bytes, but got {})",
5381                Self::ENCODED_LEN,
5382                __tmp.remaining(),
5383            )
5384        }
5385        __tmp.put_u32_le(self.time_boot_ms);
5386        __tmp.put_f32_le(self.roll);
5387        __tmp.put_f32_le(self.pitch);
5388        __tmp.put_f32_le(self.yaw);
5389        __tmp.put_f32_le(self.rollspeed);
5390        __tmp.put_f32_le(self.pitchspeed);
5391        __tmp.put_f32_le(self.yawspeed);
5392        if matches!(version, MavlinkVersion::V2) {
5393            let len = __tmp.len();
5394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5395        } else {
5396            __tmp.len()
5397        }
5398    }
5399}
5400#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5401#[doc = ""]
5402#[doc = "ID: 31"]
5403#[derive(Debug, Clone, PartialEq)]
5404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5406#[cfg_attr(feature = "ts", derive(TS))]
5407#[cfg_attr(feature = "ts", ts(export))]
5408pub struct ATTITUDE_QUATERNION_DATA {
5409    #[doc = "Timestamp (time since system boot)."]
5410    pub time_boot_ms: u32,
5411    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5412    pub q1: f32,
5413    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5414    pub q2: f32,
5415    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5416    pub q3: f32,
5417    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5418    pub q4: f32,
5419    #[doc = "Roll angular speed"]
5420    pub rollspeed: f32,
5421    #[doc = "Pitch angular speed"]
5422    pub pitchspeed: f32,
5423    #[doc = "Yaw angular speed"]
5424    pub yawspeed: f32,
5425    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5429    pub repr_offset_q: [f32; 4],
5430}
5431impl ATTITUDE_QUATERNION_DATA {
5432    pub const ENCODED_LEN: usize = 48usize;
5433    pub const DEFAULT: Self = Self {
5434        time_boot_ms: 0_u32,
5435        q1: 0.0_f32,
5436        q2: 0.0_f32,
5437        q3: 0.0_f32,
5438        q4: 0.0_f32,
5439        rollspeed: 0.0_f32,
5440        pitchspeed: 0.0_f32,
5441        yawspeed: 0.0_f32,
5442        repr_offset_q: [0.0_f32; 4usize],
5443    };
5444    #[cfg(feature = "arbitrary")]
5445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5446        use arbitrary::{Arbitrary, Unstructured};
5447        let mut buf = [0u8; 1024];
5448        rng.fill_bytes(&mut buf);
5449        let mut unstructured = Unstructured::new(&buf);
5450        Self::arbitrary(&mut unstructured).unwrap_or_default()
5451    }
5452}
5453impl Default for ATTITUDE_QUATERNION_DATA {
5454    fn default() -> Self {
5455        Self::DEFAULT.clone()
5456    }
5457}
5458impl MessageData for ATTITUDE_QUATERNION_DATA {
5459    type Message = MavMessage;
5460    const ID: u32 = 31u32;
5461    const NAME: &'static str = "ATTITUDE_QUATERNION";
5462    const EXTRA_CRC: u8 = 246u8;
5463    const ENCODED_LEN: usize = 48usize;
5464    fn deser(
5465        _version: MavlinkVersion,
5466        __input: &[u8],
5467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5468        let avail_len = __input.len();
5469        let mut payload_buf = [0; Self::ENCODED_LEN];
5470        let mut buf = if avail_len < Self::ENCODED_LEN {
5471            payload_buf[0..avail_len].copy_from_slice(__input);
5472            Bytes::new(&payload_buf)
5473        } else {
5474            Bytes::new(__input)
5475        };
5476        let mut __struct = Self::default();
5477        __struct.time_boot_ms = buf.get_u32_le();
5478        __struct.q1 = buf.get_f32_le();
5479        __struct.q2 = buf.get_f32_le();
5480        __struct.q3 = buf.get_f32_le();
5481        __struct.q4 = buf.get_f32_le();
5482        __struct.rollspeed = buf.get_f32_le();
5483        __struct.pitchspeed = buf.get_f32_le();
5484        __struct.yawspeed = buf.get_f32_le();
5485        for v in &mut __struct.repr_offset_q {
5486            let val = buf.get_f32_le();
5487            *v = val;
5488        }
5489        Ok(__struct)
5490    }
5491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5492        let mut __tmp = BytesMut::new(bytes);
5493        #[allow(clippy::absurd_extreme_comparisons)]
5494        #[allow(unused_comparisons)]
5495        if __tmp.remaining() < Self::ENCODED_LEN {
5496            panic!(
5497                "buffer is too small (need {} bytes, but got {})",
5498                Self::ENCODED_LEN,
5499                __tmp.remaining(),
5500            )
5501        }
5502        __tmp.put_u32_le(self.time_boot_ms);
5503        __tmp.put_f32_le(self.q1);
5504        __tmp.put_f32_le(self.q2);
5505        __tmp.put_f32_le(self.q3);
5506        __tmp.put_f32_le(self.q4);
5507        __tmp.put_f32_le(self.rollspeed);
5508        __tmp.put_f32_le(self.pitchspeed);
5509        __tmp.put_f32_le(self.yawspeed);
5510        if matches!(version, MavlinkVersion::V2) {
5511            for val in &self.repr_offset_q {
5512                __tmp.put_f32_le(*val);
5513            }
5514            let len = __tmp.len();
5515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5516        } else {
5517            __tmp.len()
5518        }
5519    }
5520}
5521#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5522#[doc = ""]
5523#[doc = "ID: 61"]
5524#[derive(Debug, Clone, PartialEq)]
5525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5527#[cfg_attr(feature = "ts", derive(TS))]
5528#[cfg_attr(feature = "ts", ts(export))]
5529pub struct ATTITUDE_QUATERNION_COV_DATA {
5530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5531    pub time_usec: u64,
5532    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5533    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5534    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5535    pub q: [f32; 4],
5536    #[doc = "Roll angular speed"]
5537    pub rollspeed: f32,
5538    #[doc = "Pitch angular speed"]
5539    pub pitchspeed: f32,
5540    #[doc = "Yaw angular speed"]
5541    pub yawspeed: f32,
5542    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5543    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5544    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5545    pub covariance: [f32; 9],
5546}
5547impl ATTITUDE_QUATERNION_COV_DATA {
5548    pub const ENCODED_LEN: usize = 72usize;
5549    pub const DEFAULT: Self = Self {
5550        time_usec: 0_u64,
5551        q: [0.0_f32; 4usize],
5552        rollspeed: 0.0_f32,
5553        pitchspeed: 0.0_f32,
5554        yawspeed: 0.0_f32,
5555        covariance: [0.0_f32; 9usize],
5556    };
5557    #[cfg(feature = "arbitrary")]
5558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5559        use arbitrary::{Arbitrary, Unstructured};
5560        let mut buf = [0u8; 1024];
5561        rng.fill_bytes(&mut buf);
5562        let mut unstructured = Unstructured::new(&buf);
5563        Self::arbitrary(&mut unstructured).unwrap_or_default()
5564    }
5565}
5566impl Default for ATTITUDE_QUATERNION_COV_DATA {
5567    fn default() -> Self {
5568        Self::DEFAULT.clone()
5569    }
5570}
5571impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5572    type Message = MavMessage;
5573    const ID: u32 = 61u32;
5574    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5575    const EXTRA_CRC: u8 = 167u8;
5576    const ENCODED_LEN: usize = 72usize;
5577    fn deser(
5578        _version: MavlinkVersion,
5579        __input: &[u8],
5580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5581        let avail_len = __input.len();
5582        let mut payload_buf = [0; Self::ENCODED_LEN];
5583        let mut buf = if avail_len < Self::ENCODED_LEN {
5584            payload_buf[0..avail_len].copy_from_slice(__input);
5585            Bytes::new(&payload_buf)
5586        } else {
5587            Bytes::new(__input)
5588        };
5589        let mut __struct = Self::default();
5590        __struct.time_usec = buf.get_u64_le();
5591        for v in &mut __struct.q {
5592            let val = buf.get_f32_le();
5593            *v = val;
5594        }
5595        __struct.rollspeed = buf.get_f32_le();
5596        __struct.pitchspeed = buf.get_f32_le();
5597        __struct.yawspeed = buf.get_f32_le();
5598        for v in &mut __struct.covariance {
5599            let val = buf.get_f32_le();
5600            *v = val;
5601        }
5602        Ok(__struct)
5603    }
5604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5605        let mut __tmp = BytesMut::new(bytes);
5606        #[allow(clippy::absurd_extreme_comparisons)]
5607        #[allow(unused_comparisons)]
5608        if __tmp.remaining() < Self::ENCODED_LEN {
5609            panic!(
5610                "buffer is too small (need {} bytes, but got {})",
5611                Self::ENCODED_LEN,
5612                __tmp.remaining(),
5613            )
5614        }
5615        __tmp.put_u64_le(self.time_usec);
5616        for val in &self.q {
5617            __tmp.put_f32_le(*val);
5618        }
5619        __tmp.put_f32_le(self.rollspeed);
5620        __tmp.put_f32_le(self.pitchspeed);
5621        __tmp.put_f32_le(self.yawspeed);
5622        for val in &self.covariance {
5623            __tmp.put_f32_le(*val);
5624        }
5625        if matches!(version, MavlinkVersion::V2) {
5626            let len = __tmp.len();
5627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5628        } else {
5629            __tmp.len()
5630        }
5631    }
5632}
5633#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5634#[doc = ""]
5635#[doc = "ID: 83"]
5636#[derive(Debug, Clone, PartialEq)]
5637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5639#[cfg_attr(feature = "ts", derive(TS))]
5640#[cfg_attr(feature = "ts", ts(export))]
5641pub struct ATTITUDE_TARGET_DATA {
5642    #[doc = "Timestamp (time since system boot)."]
5643    pub time_boot_ms: u32,
5644    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5645    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5646    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5647    pub q: [f32; 4],
5648    #[doc = "Body roll rate"]
5649    pub body_roll_rate: f32,
5650    #[doc = "Body pitch rate"]
5651    pub body_pitch_rate: f32,
5652    #[doc = "Body yaw rate"]
5653    pub body_yaw_rate: f32,
5654    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5655    pub thrust: f32,
5656    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5657    pub type_mask: AttitudeTargetTypemask,
5658}
5659impl ATTITUDE_TARGET_DATA {
5660    pub const ENCODED_LEN: usize = 37usize;
5661    pub const DEFAULT: Self = Self {
5662        time_boot_ms: 0_u32,
5663        q: [0.0_f32; 4usize],
5664        body_roll_rate: 0.0_f32,
5665        body_pitch_rate: 0.0_f32,
5666        body_yaw_rate: 0.0_f32,
5667        thrust: 0.0_f32,
5668        type_mask: AttitudeTargetTypemask::DEFAULT,
5669    };
5670    #[cfg(feature = "arbitrary")]
5671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5672        use arbitrary::{Arbitrary, Unstructured};
5673        let mut buf = [0u8; 1024];
5674        rng.fill_bytes(&mut buf);
5675        let mut unstructured = Unstructured::new(&buf);
5676        Self::arbitrary(&mut unstructured).unwrap_or_default()
5677    }
5678}
5679impl Default for ATTITUDE_TARGET_DATA {
5680    fn default() -> Self {
5681        Self::DEFAULT.clone()
5682    }
5683}
5684impl MessageData for ATTITUDE_TARGET_DATA {
5685    type Message = MavMessage;
5686    const ID: u32 = 83u32;
5687    const NAME: &'static str = "ATTITUDE_TARGET";
5688    const EXTRA_CRC: u8 = 22u8;
5689    const ENCODED_LEN: usize = 37usize;
5690    fn deser(
5691        _version: MavlinkVersion,
5692        __input: &[u8],
5693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5694        let avail_len = __input.len();
5695        let mut payload_buf = [0; Self::ENCODED_LEN];
5696        let mut buf = if avail_len < Self::ENCODED_LEN {
5697            payload_buf[0..avail_len].copy_from_slice(__input);
5698            Bytes::new(&payload_buf)
5699        } else {
5700            Bytes::new(__input)
5701        };
5702        let mut __struct = Self::default();
5703        __struct.time_boot_ms = buf.get_u32_le();
5704        for v in &mut __struct.q {
5705            let val = buf.get_f32_le();
5706            *v = val;
5707        }
5708        __struct.body_roll_rate = buf.get_f32_le();
5709        __struct.body_pitch_rate = buf.get_f32_le();
5710        __struct.body_yaw_rate = buf.get_f32_le();
5711        __struct.thrust = buf.get_f32_le();
5712        let tmp = buf.get_u8();
5713        __struct.type_mask =
5714            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5715                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5716                    flag_type: "AttitudeTargetTypemask",
5717                    value: tmp as u64,
5718                })?;
5719        Ok(__struct)
5720    }
5721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5722        let mut __tmp = BytesMut::new(bytes);
5723        #[allow(clippy::absurd_extreme_comparisons)]
5724        #[allow(unused_comparisons)]
5725        if __tmp.remaining() < Self::ENCODED_LEN {
5726            panic!(
5727                "buffer is too small (need {} bytes, but got {})",
5728                Self::ENCODED_LEN,
5729                __tmp.remaining(),
5730            )
5731        }
5732        __tmp.put_u32_le(self.time_boot_ms);
5733        for val in &self.q {
5734            __tmp.put_f32_le(*val);
5735        }
5736        __tmp.put_f32_le(self.body_roll_rate);
5737        __tmp.put_f32_le(self.body_pitch_rate);
5738        __tmp.put_f32_le(self.body_yaw_rate);
5739        __tmp.put_f32_le(self.thrust);
5740        __tmp.put_u8(self.type_mask.bits() as u8);
5741        if matches!(version, MavlinkVersion::V2) {
5742            let len = __tmp.len();
5743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5744        } else {
5745            __tmp.len()
5746        }
5747    }
5748}
5749#[doc = "Motion capture attitude and position."]
5750#[doc = ""]
5751#[doc = "ID: 138"]
5752#[derive(Debug, Clone, PartialEq)]
5753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5755#[cfg_attr(feature = "ts", derive(TS))]
5756#[cfg_attr(feature = "ts", ts(export))]
5757pub struct ATT_POS_MOCAP_DATA {
5758    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5759    pub time_usec: u64,
5760    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5761    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5762    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5763    pub q: [f32; 4],
5764    #[doc = "X position (NED)"]
5765    pub x: f32,
5766    #[doc = "Y position (NED)"]
5767    pub y: f32,
5768    #[doc = "Z position (NED)"]
5769    pub z: f32,
5770    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5771    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5772    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5773    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5774    pub covariance: [f32; 21],
5775}
5776impl ATT_POS_MOCAP_DATA {
5777    pub const ENCODED_LEN: usize = 120usize;
5778    pub const DEFAULT: Self = Self {
5779        time_usec: 0_u64,
5780        q: [0.0_f32; 4usize],
5781        x: 0.0_f32,
5782        y: 0.0_f32,
5783        z: 0.0_f32,
5784        covariance: [0.0_f32; 21usize],
5785    };
5786    #[cfg(feature = "arbitrary")]
5787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5788        use arbitrary::{Arbitrary, Unstructured};
5789        let mut buf = [0u8; 1024];
5790        rng.fill_bytes(&mut buf);
5791        let mut unstructured = Unstructured::new(&buf);
5792        Self::arbitrary(&mut unstructured).unwrap_or_default()
5793    }
5794}
5795impl Default for ATT_POS_MOCAP_DATA {
5796    fn default() -> Self {
5797        Self::DEFAULT.clone()
5798    }
5799}
5800impl MessageData for ATT_POS_MOCAP_DATA {
5801    type Message = MavMessage;
5802    const ID: u32 = 138u32;
5803    const NAME: &'static str = "ATT_POS_MOCAP";
5804    const EXTRA_CRC: u8 = 109u8;
5805    const ENCODED_LEN: usize = 120usize;
5806    fn deser(
5807        _version: MavlinkVersion,
5808        __input: &[u8],
5809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5810        let avail_len = __input.len();
5811        let mut payload_buf = [0; Self::ENCODED_LEN];
5812        let mut buf = if avail_len < Self::ENCODED_LEN {
5813            payload_buf[0..avail_len].copy_from_slice(__input);
5814            Bytes::new(&payload_buf)
5815        } else {
5816            Bytes::new(__input)
5817        };
5818        let mut __struct = Self::default();
5819        __struct.time_usec = buf.get_u64_le();
5820        for v in &mut __struct.q {
5821            let val = buf.get_f32_le();
5822            *v = val;
5823        }
5824        __struct.x = buf.get_f32_le();
5825        __struct.y = buf.get_f32_le();
5826        __struct.z = buf.get_f32_le();
5827        for v in &mut __struct.covariance {
5828            let val = buf.get_f32_le();
5829            *v = val;
5830        }
5831        Ok(__struct)
5832    }
5833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5834        let mut __tmp = BytesMut::new(bytes);
5835        #[allow(clippy::absurd_extreme_comparisons)]
5836        #[allow(unused_comparisons)]
5837        if __tmp.remaining() < Self::ENCODED_LEN {
5838            panic!(
5839                "buffer is too small (need {} bytes, but got {})",
5840                Self::ENCODED_LEN,
5841                __tmp.remaining(),
5842            )
5843        }
5844        __tmp.put_u64_le(self.time_usec);
5845        for val in &self.q {
5846            __tmp.put_f32_le(*val);
5847        }
5848        __tmp.put_f32_le(self.x);
5849        __tmp.put_f32_le(self.y);
5850        __tmp.put_f32_le(self.z);
5851        if matches!(version, MavlinkVersion::V2) {
5852            for val in &self.covariance {
5853                __tmp.put_f32_le(*val);
5854            }
5855            let len = __tmp.len();
5856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5857        } else {
5858            __tmp.len()
5859        }
5860    }
5861}
5862#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5863#[doc = ""]
5864#[doc = "ID: 7"]
5865#[derive(Debug, Clone, PartialEq)]
5866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5868#[cfg_attr(feature = "ts", derive(TS))]
5869#[cfg_attr(feature = "ts", ts(export))]
5870pub struct AUTH_KEY_DATA {
5871    #[doc = "key"]
5872    #[cfg_attr(feature = "ts", ts(type = "string"))]
5873    pub key: CharArray<32>,
5874}
5875impl AUTH_KEY_DATA {
5876    pub const ENCODED_LEN: usize = 32usize;
5877    pub const DEFAULT: Self = Self {
5878        key: CharArray::new([0_u8; 32usize]),
5879    };
5880    #[cfg(feature = "arbitrary")]
5881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5882        use arbitrary::{Arbitrary, Unstructured};
5883        let mut buf = [0u8; 1024];
5884        rng.fill_bytes(&mut buf);
5885        let mut unstructured = Unstructured::new(&buf);
5886        Self::arbitrary(&mut unstructured).unwrap_or_default()
5887    }
5888}
5889impl Default for AUTH_KEY_DATA {
5890    fn default() -> Self {
5891        Self::DEFAULT.clone()
5892    }
5893}
5894impl MessageData for AUTH_KEY_DATA {
5895    type Message = MavMessage;
5896    const ID: u32 = 7u32;
5897    const NAME: &'static str = "AUTH_KEY";
5898    const EXTRA_CRC: u8 = 119u8;
5899    const ENCODED_LEN: usize = 32usize;
5900    fn deser(
5901        _version: MavlinkVersion,
5902        __input: &[u8],
5903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5904        let avail_len = __input.len();
5905        let mut payload_buf = [0; Self::ENCODED_LEN];
5906        let mut buf = if avail_len < Self::ENCODED_LEN {
5907            payload_buf[0..avail_len].copy_from_slice(__input);
5908            Bytes::new(&payload_buf)
5909        } else {
5910            Bytes::new(__input)
5911        };
5912        let mut __struct = Self::default();
5913        let mut tmp = [0_u8; 32usize];
5914        for v in &mut tmp {
5915            *v = buf.get_u8();
5916        }
5917        __struct.key = CharArray::new(tmp);
5918        Ok(__struct)
5919    }
5920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5921        let mut __tmp = BytesMut::new(bytes);
5922        #[allow(clippy::absurd_extreme_comparisons)]
5923        #[allow(unused_comparisons)]
5924        if __tmp.remaining() < Self::ENCODED_LEN {
5925            panic!(
5926                "buffer is too small (need {} bytes, but got {})",
5927                Self::ENCODED_LEN,
5928                __tmp.remaining(),
5929            )
5930        }
5931        for val in &self.key {
5932            __tmp.put_u8(*val);
5933        }
5934        if matches!(version, MavlinkVersion::V2) {
5935            let len = __tmp.len();
5936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5937        } else {
5938            __tmp.len()
5939        }
5940    }
5941}
5942#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5943#[doc = ""]
5944#[doc = "ID: 286"]
5945#[derive(Debug, Clone, PartialEq)]
5946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5948#[cfg_attr(feature = "ts", derive(TS))]
5949#[cfg_attr(feature = "ts", ts(export))]
5950pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5951    #[doc = "Timestamp (time since system boot)."]
5952    pub time_boot_us: u64,
5953    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5956    pub q: [f32; 4],
5957    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5958    pub q_estimated_delay_us: u32,
5959    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5960    pub vx: f32,
5961    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5962    pub vy: f32,
5963    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5964    pub vz: f32,
5965    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5966    pub v_estimated_delay_us: u32,
5967    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5968    pub feed_forward_angular_velocity_z: f32,
5969    #[doc = "Bitmap indicating which estimator outputs are valid."]
5970    pub estimator_status: EstimatorStatusFlags,
5971    #[doc = "System ID"]
5972    pub target_system: u8,
5973    #[doc = "Component ID"]
5974    pub target_component: u8,
5975    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5976    pub landed_state: MavLandedState,
5977    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5979    pub angular_velocity_z: f32,
5980}
5981impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5982    pub const ENCODED_LEN: usize = 57usize;
5983    pub const DEFAULT: Self = Self {
5984        time_boot_us: 0_u64,
5985        q: [0.0_f32; 4usize],
5986        q_estimated_delay_us: 0_u32,
5987        vx: 0.0_f32,
5988        vy: 0.0_f32,
5989        vz: 0.0_f32,
5990        v_estimated_delay_us: 0_u32,
5991        feed_forward_angular_velocity_z: 0.0_f32,
5992        estimator_status: EstimatorStatusFlags::DEFAULT,
5993        target_system: 0_u8,
5994        target_component: 0_u8,
5995        landed_state: MavLandedState::DEFAULT,
5996        angular_velocity_z: 0.0_f32,
5997    };
5998    #[cfg(feature = "arbitrary")]
5999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6000        use arbitrary::{Arbitrary, Unstructured};
6001        let mut buf = [0u8; 1024];
6002        rng.fill_bytes(&mut buf);
6003        let mut unstructured = Unstructured::new(&buf);
6004        Self::arbitrary(&mut unstructured).unwrap_or_default()
6005    }
6006}
6007impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6008    fn default() -> Self {
6009        Self::DEFAULT.clone()
6010    }
6011}
6012impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6013    type Message = MavMessage;
6014    const ID: u32 = 286u32;
6015    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6016    const EXTRA_CRC: u8 = 210u8;
6017    const ENCODED_LEN: usize = 57usize;
6018    fn deser(
6019        _version: MavlinkVersion,
6020        __input: &[u8],
6021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6022        let avail_len = __input.len();
6023        let mut payload_buf = [0; Self::ENCODED_LEN];
6024        let mut buf = if avail_len < Self::ENCODED_LEN {
6025            payload_buf[0..avail_len].copy_from_slice(__input);
6026            Bytes::new(&payload_buf)
6027        } else {
6028            Bytes::new(__input)
6029        };
6030        let mut __struct = Self::default();
6031        __struct.time_boot_us = buf.get_u64_le();
6032        for v in &mut __struct.q {
6033            let val = buf.get_f32_le();
6034            *v = val;
6035        }
6036        __struct.q_estimated_delay_us = buf.get_u32_le();
6037        __struct.vx = buf.get_f32_le();
6038        __struct.vy = buf.get_f32_le();
6039        __struct.vz = buf.get_f32_le();
6040        __struct.v_estimated_delay_us = buf.get_u32_le();
6041        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6042        let tmp = buf.get_u16_le();
6043        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6044            tmp as <EstimatorStatusFlags as Flags>::Bits,
6045        )
6046        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6047            flag_type: "EstimatorStatusFlags",
6048            value: tmp as u64,
6049        })?;
6050        __struct.target_system = buf.get_u8();
6051        __struct.target_component = buf.get_u8();
6052        let tmp = buf.get_u8();
6053        __struct.landed_state =
6054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6055                enum_type: "MavLandedState",
6056                value: tmp as u64,
6057            })?;
6058        __struct.angular_velocity_z = buf.get_f32_le();
6059        Ok(__struct)
6060    }
6061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6062        let mut __tmp = BytesMut::new(bytes);
6063        #[allow(clippy::absurd_extreme_comparisons)]
6064        #[allow(unused_comparisons)]
6065        if __tmp.remaining() < Self::ENCODED_LEN {
6066            panic!(
6067                "buffer is too small (need {} bytes, but got {})",
6068                Self::ENCODED_LEN,
6069                __tmp.remaining(),
6070            )
6071        }
6072        __tmp.put_u64_le(self.time_boot_us);
6073        for val in &self.q {
6074            __tmp.put_f32_le(*val);
6075        }
6076        __tmp.put_u32_le(self.q_estimated_delay_us);
6077        __tmp.put_f32_le(self.vx);
6078        __tmp.put_f32_le(self.vy);
6079        __tmp.put_f32_le(self.vz);
6080        __tmp.put_u32_le(self.v_estimated_delay_us);
6081        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6082        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6083        __tmp.put_u8(self.target_system);
6084        __tmp.put_u8(self.target_component);
6085        __tmp.put_u8(self.landed_state as u8);
6086        if matches!(version, MavlinkVersion::V2) {
6087            __tmp.put_f32_le(self.angular_velocity_z);
6088            let len = __tmp.len();
6089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6090        } else {
6091            __tmp.len()
6092        }
6093    }
6094}
6095#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6096#[doc = ""]
6097#[doc = "ID: 148"]
6098#[derive(Debug, Clone, PartialEq)]
6099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6101#[cfg_attr(feature = "ts", derive(TS))]
6102#[cfg_attr(feature = "ts", ts(export))]
6103pub struct AUTOPILOT_VERSION_DATA {
6104    #[doc = "Bitmap of capabilities"]
6105    pub capabilities: MavProtocolCapability,
6106    #[doc = "UID if provided by hardware (see uid2)"]
6107    pub uid: u64,
6108    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6109    pub flight_sw_version: u32,
6110    #[doc = "Middleware version number"]
6111    pub middleware_sw_version: u32,
6112    #[doc = "Operating system version number"]
6113    pub os_sw_version: u32,
6114    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6115    pub board_version: u32,
6116    #[doc = "ID of the board vendor"]
6117    pub vendor_id: u16,
6118    #[doc = "ID of the product"]
6119    pub product_id: u16,
6120    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6123    pub flight_custom_version: [u8; 8],
6124    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6127    pub middleware_custom_version: [u8; 8],
6128    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6131    pub os_custom_version: [u8; 8],
6132    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6133    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6134    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6135    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6136    pub uid2: [u8; 18],
6137}
6138impl AUTOPILOT_VERSION_DATA {
6139    pub const ENCODED_LEN: usize = 78usize;
6140    pub const DEFAULT: Self = Self {
6141        capabilities: MavProtocolCapability::DEFAULT,
6142        uid: 0_u64,
6143        flight_sw_version: 0_u32,
6144        middleware_sw_version: 0_u32,
6145        os_sw_version: 0_u32,
6146        board_version: 0_u32,
6147        vendor_id: 0_u16,
6148        product_id: 0_u16,
6149        flight_custom_version: [0_u8; 8usize],
6150        middleware_custom_version: [0_u8; 8usize],
6151        os_custom_version: [0_u8; 8usize],
6152        uid2: [0_u8; 18usize],
6153    };
6154    #[cfg(feature = "arbitrary")]
6155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6156        use arbitrary::{Arbitrary, Unstructured};
6157        let mut buf = [0u8; 1024];
6158        rng.fill_bytes(&mut buf);
6159        let mut unstructured = Unstructured::new(&buf);
6160        Self::arbitrary(&mut unstructured).unwrap_or_default()
6161    }
6162}
6163impl Default for AUTOPILOT_VERSION_DATA {
6164    fn default() -> Self {
6165        Self::DEFAULT.clone()
6166    }
6167}
6168impl MessageData for AUTOPILOT_VERSION_DATA {
6169    type Message = MavMessage;
6170    const ID: u32 = 148u32;
6171    const NAME: &'static str = "AUTOPILOT_VERSION";
6172    const EXTRA_CRC: u8 = 178u8;
6173    const ENCODED_LEN: usize = 78usize;
6174    fn deser(
6175        _version: MavlinkVersion,
6176        __input: &[u8],
6177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6178        let avail_len = __input.len();
6179        let mut payload_buf = [0; Self::ENCODED_LEN];
6180        let mut buf = if avail_len < Self::ENCODED_LEN {
6181            payload_buf[0..avail_len].copy_from_slice(__input);
6182            Bytes::new(&payload_buf)
6183        } else {
6184            Bytes::new(__input)
6185        };
6186        let mut __struct = Self::default();
6187        let tmp = buf.get_u64_le();
6188        __struct.capabilities = MavProtocolCapability::from_bits(
6189            tmp as <MavProtocolCapability as Flags>::Bits,
6190        )
6191        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6192            flag_type: "MavProtocolCapability",
6193            value: tmp as u64,
6194        })?;
6195        __struct.uid = buf.get_u64_le();
6196        __struct.flight_sw_version = buf.get_u32_le();
6197        __struct.middleware_sw_version = buf.get_u32_le();
6198        __struct.os_sw_version = buf.get_u32_le();
6199        __struct.board_version = buf.get_u32_le();
6200        __struct.vendor_id = buf.get_u16_le();
6201        __struct.product_id = buf.get_u16_le();
6202        for v in &mut __struct.flight_custom_version {
6203            let val = buf.get_u8();
6204            *v = val;
6205        }
6206        for v in &mut __struct.middleware_custom_version {
6207            let val = buf.get_u8();
6208            *v = val;
6209        }
6210        for v in &mut __struct.os_custom_version {
6211            let val = buf.get_u8();
6212            *v = val;
6213        }
6214        for v in &mut __struct.uid2 {
6215            let val = buf.get_u8();
6216            *v = val;
6217        }
6218        Ok(__struct)
6219    }
6220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6221        let mut __tmp = BytesMut::new(bytes);
6222        #[allow(clippy::absurd_extreme_comparisons)]
6223        #[allow(unused_comparisons)]
6224        if __tmp.remaining() < Self::ENCODED_LEN {
6225            panic!(
6226                "buffer is too small (need {} bytes, but got {})",
6227                Self::ENCODED_LEN,
6228                __tmp.remaining(),
6229            )
6230        }
6231        __tmp.put_u64_le(self.capabilities.bits() as u64);
6232        __tmp.put_u64_le(self.uid);
6233        __tmp.put_u32_le(self.flight_sw_version);
6234        __tmp.put_u32_le(self.middleware_sw_version);
6235        __tmp.put_u32_le(self.os_sw_version);
6236        __tmp.put_u32_le(self.board_version);
6237        __tmp.put_u16_le(self.vendor_id);
6238        __tmp.put_u16_le(self.product_id);
6239        for val in &self.flight_custom_version {
6240            __tmp.put_u8(*val);
6241        }
6242        for val in &self.middleware_custom_version {
6243            __tmp.put_u8(*val);
6244        }
6245        for val in &self.os_custom_version {
6246            __tmp.put_u8(*val);
6247        }
6248        if matches!(version, MavlinkVersion::V2) {
6249            for val in &self.uid2 {
6250                __tmp.put_u8(*val);
6251            }
6252            let len = __tmp.len();
6253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6254        } else {
6255            __tmp.len()
6256        }
6257    }
6258}
6259#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6260#[doc = ""]
6261#[doc = "ID: 435"]
6262#[derive(Debug, Clone, PartialEq)]
6263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6265#[cfg_attr(feature = "ts", derive(TS))]
6266#[cfg_attr(feature = "ts", ts(export))]
6267pub struct AVAILABLE_MODES_DATA {
6268    #[doc = "A bitfield for use for autopilot-specific flags"]
6269    pub custom_mode: u32,
6270    #[doc = "Mode properties."]
6271    pub properties: MavModeProperty,
6272    #[doc = "The total number of available modes for the current vehicle type."]
6273    pub number_modes: u8,
6274    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6275    pub mode_index: u8,
6276    #[doc = "Standard mode."]
6277    pub standard_mode: MavStandardMode,
6278    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6279    #[cfg_attr(feature = "ts", ts(type = "string"))]
6280    pub mode_name: CharArray<35>,
6281}
6282impl AVAILABLE_MODES_DATA {
6283    pub const ENCODED_LEN: usize = 46usize;
6284    pub const DEFAULT: Self = Self {
6285        custom_mode: 0_u32,
6286        properties: MavModeProperty::DEFAULT,
6287        number_modes: 0_u8,
6288        mode_index: 0_u8,
6289        standard_mode: MavStandardMode::DEFAULT,
6290        mode_name: CharArray::new([0_u8; 35usize]),
6291    };
6292    #[cfg(feature = "arbitrary")]
6293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6294        use arbitrary::{Arbitrary, Unstructured};
6295        let mut buf = [0u8; 1024];
6296        rng.fill_bytes(&mut buf);
6297        let mut unstructured = Unstructured::new(&buf);
6298        Self::arbitrary(&mut unstructured).unwrap_or_default()
6299    }
6300}
6301impl Default for AVAILABLE_MODES_DATA {
6302    fn default() -> Self {
6303        Self::DEFAULT.clone()
6304    }
6305}
6306impl MessageData for AVAILABLE_MODES_DATA {
6307    type Message = MavMessage;
6308    const ID: u32 = 435u32;
6309    const NAME: &'static str = "AVAILABLE_MODES";
6310    const EXTRA_CRC: u8 = 134u8;
6311    const ENCODED_LEN: usize = 46usize;
6312    fn deser(
6313        _version: MavlinkVersion,
6314        __input: &[u8],
6315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6316        let avail_len = __input.len();
6317        let mut payload_buf = [0; Self::ENCODED_LEN];
6318        let mut buf = if avail_len < Self::ENCODED_LEN {
6319            payload_buf[0..avail_len].copy_from_slice(__input);
6320            Bytes::new(&payload_buf)
6321        } else {
6322            Bytes::new(__input)
6323        };
6324        let mut __struct = Self::default();
6325        __struct.custom_mode = buf.get_u32_le();
6326        let tmp = buf.get_u32_le();
6327        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6328            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6329            flag_type: "MavModeProperty",
6330            value: tmp as u64,
6331        })?;
6332        __struct.number_modes = buf.get_u8();
6333        __struct.mode_index = buf.get_u8();
6334        let tmp = buf.get_u8();
6335        __struct.standard_mode =
6336            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6337                enum_type: "MavStandardMode",
6338                value: tmp as u64,
6339            })?;
6340        let mut tmp = [0_u8; 35usize];
6341        for v in &mut tmp {
6342            *v = buf.get_u8();
6343        }
6344        __struct.mode_name = CharArray::new(tmp);
6345        Ok(__struct)
6346    }
6347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6348        let mut __tmp = BytesMut::new(bytes);
6349        #[allow(clippy::absurd_extreme_comparisons)]
6350        #[allow(unused_comparisons)]
6351        if __tmp.remaining() < Self::ENCODED_LEN {
6352            panic!(
6353                "buffer is too small (need {} bytes, but got {})",
6354                Self::ENCODED_LEN,
6355                __tmp.remaining(),
6356            )
6357        }
6358        __tmp.put_u32_le(self.custom_mode);
6359        __tmp.put_u32_le(self.properties.bits() as u32);
6360        __tmp.put_u8(self.number_modes);
6361        __tmp.put_u8(self.mode_index);
6362        __tmp.put_u8(self.standard_mode as u8);
6363        for val in &self.mode_name {
6364            __tmp.put_u8(*val);
6365        }
6366        if matches!(version, MavlinkVersion::V2) {
6367            let len = __tmp.len();
6368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6369        } else {
6370            __tmp.len()
6371        }
6372    }
6373}
6374#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6375#[doc = ""]
6376#[doc = "ID: 437"]
6377#[derive(Debug, Clone, PartialEq)]
6378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6380#[cfg_attr(feature = "ts", derive(TS))]
6381#[cfg_attr(feature = "ts", ts(export))]
6382pub struct AVAILABLE_MODES_MONITOR_DATA {
6383    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6384    pub seq: u8,
6385}
6386impl AVAILABLE_MODES_MONITOR_DATA {
6387    pub const ENCODED_LEN: usize = 1usize;
6388    pub const DEFAULT: Self = Self { seq: 0_u8 };
6389    #[cfg(feature = "arbitrary")]
6390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6391        use arbitrary::{Arbitrary, Unstructured};
6392        let mut buf = [0u8; 1024];
6393        rng.fill_bytes(&mut buf);
6394        let mut unstructured = Unstructured::new(&buf);
6395        Self::arbitrary(&mut unstructured).unwrap_or_default()
6396    }
6397}
6398impl Default for AVAILABLE_MODES_MONITOR_DATA {
6399    fn default() -> Self {
6400        Self::DEFAULT.clone()
6401    }
6402}
6403impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6404    type Message = MavMessage;
6405    const ID: u32 = 437u32;
6406    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6407    const EXTRA_CRC: u8 = 30u8;
6408    const ENCODED_LEN: usize = 1usize;
6409    fn deser(
6410        _version: MavlinkVersion,
6411        __input: &[u8],
6412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6413        let avail_len = __input.len();
6414        let mut payload_buf = [0; Self::ENCODED_LEN];
6415        let mut buf = if avail_len < Self::ENCODED_LEN {
6416            payload_buf[0..avail_len].copy_from_slice(__input);
6417            Bytes::new(&payload_buf)
6418        } else {
6419            Bytes::new(__input)
6420        };
6421        let mut __struct = Self::default();
6422        __struct.seq = buf.get_u8();
6423        Ok(__struct)
6424    }
6425    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6426        let mut __tmp = BytesMut::new(bytes);
6427        #[allow(clippy::absurd_extreme_comparisons)]
6428        #[allow(unused_comparisons)]
6429        if __tmp.remaining() < Self::ENCODED_LEN {
6430            panic!(
6431                "buffer is too small (need {} bytes, but got {})",
6432                Self::ENCODED_LEN,
6433                __tmp.remaining(),
6434            )
6435        }
6436        __tmp.put_u8(self.seq);
6437        if matches!(version, MavlinkVersion::V2) {
6438            let len = __tmp.len();
6439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6440        } else {
6441            __tmp.len()
6442        }
6443    }
6444}
6445#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6446#[doc = ""]
6447#[doc = "ID: 372"]
6448#[derive(Debug, Clone, PartialEq)]
6449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6451#[cfg_attr(feature = "ts", derive(TS))]
6452#[cfg_attr(feature = "ts", ts(export))]
6453pub struct BATTERY_INFO_DATA {
6454    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6455    pub discharge_minimum_voltage: f32,
6456    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6457    pub charging_minimum_voltage: f32,
6458    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6459    pub resting_minimum_voltage: f32,
6460    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6461    pub charging_maximum_voltage: f32,
6462    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6463    pub charging_maximum_current: f32,
6464    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6465    pub nominal_voltage: f32,
6466    #[doc = "Maximum pack discharge current. 0: field not provided."]
6467    pub discharge_maximum_current: f32,
6468    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6469    pub discharge_maximum_burst_current: f32,
6470    #[doc = "Fully charged design capacity. 0: field not provided."]
6471    pub design_capacity: f32,
6472    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6473    pub full_charge_capacity: f32,
6474    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6475    pub cycle_count: u16,
6476    #[doc = "Battery weight. 0: field not provided."]
6477    pub weight: u16,
6478    #[doc = "Battery ID"]
6479    pub id: u8,
6480    #[doc = "Function of the battery."]
6481    pub battery_function: MavBatteryFunction,
6482    #[doc = "Type (chemistry) of the battery."]
6483    pub mavtype: MavBatteryType,
6484    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6485    pub state_of_health: u8,
6486    #[doc = "Number of battery cells in series. 0: field not provided."]
6487    pub cells_in_series: u8,
6488    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6489    #[cfg_attr(feature = "ts", ts(type = "string"))]
6490    pub manufacture_date: CharArray<9>,
6491    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6492    #[cfg_attr(feature = "ts", ts(type = "string"))]
6493    pub serial_number: CharArray<32>,
6494    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6495    #[cfg_attr(feature = "ts", ts(type = "string"))]
6496    pub name: CharArray<50>,
6497}
6498impl BATTERY_INFO_DATA {
6499    pub const ENCODED_LEN: usize = 140usize;
6500    pub const DEFAULT: Self = Self {
6501        discharge_minimum_voltage: 0.0_f32,
6502        charging_minimum_voltage: 0.0_f32,
6503        resting_minimum_voltage: 0.0_f32,
6504        charging_maximum_voltage: 0.0_f32,
6505        charging_maximum_current: 0.0_f32,
6506        nominal_voltage: 0.0_f32,
6507        discharge_maximum_current: 0.0_f32,
6508        discharge_maximum_burst_current: 0.0_f32,
6509        design_capacity: 0.0_f32,
6510        full_charge_capacity: 0.0_f32,
6511        cycle_count: 0_u16,
6512        weight: 0_u16,
6513        id: 0_u8,
6514        battery_function: MavBatteryFunction::DEFAULT,
6515        mavtype: MavBatteryType::DEFAULT,
6516        state_of_health: 0_u8,
6517        cells_in_series: 0_u8,
6518        manufacture_date: CharArray::new([0_u8; 9usize]),
6519        serial_number: CharArray::new([0_u8; 32usize]),
6520        name: CharArray::new([0_u8; 50usize]),
6521    };
6522    #[cfg(feature = "arbitrary")]
6523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6524        use arbitrary::{Arbitrary, Unstructured};
6525        let mut buf = [0u8; 1024];
6526        rng.fill_bytes(&mut buf);
6527        let mut unstructured = Unstructured::new(&buf);
6528        Self::arbitrary(&mut unstructured).unwrap_or_default()
6529    }
6530}
6531impl Default for BATTERY_INFO_DATA {
6532    fn default() -> Self {
6533        Self::DEFAULT.clone()
6534    }
6535}
6536impl MessageData for BATTERY_INFO_DATA {
6537    type Message = MavMessage;
6538    const ID: u32 = 372u32;
6539    const NAME: &'static str = "BATTERY_INFO";
6540    const EXTRA_CRC: u8 = 26u8;
6541    const ENCODED_LEN: usize = 140usize;
6542    fn deser(
6543        _version: MavlinkVersion,
6544        __input: &[u8],
6545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6546        let avail_len = __input.len();
6547        let mut payload_buf = [0; Self::ENCODED_LEN];
6548        let mut buf = if avail_len < Self::ENCODED_LEN {
6549            payload_buf[0..avail_len].copy_from_slice(__input);
6550            Bytes::new(&payload_buf)
6551        } else {
6552            Bytes::new(__input)
6553        };
6554        let mut __struct = Self::default();
6555        __struct.discharge_minimum_voltage = buf.get_f32_le();
6556        __struct.charging_minimum_voltage = buf.get_f32_le();
6557        __struct.resting_minimum_voltage = buf.get_f32_le();
6558        __struct.charging_maximum_voltage = buf.get_f32_le();
6559        __struct.charging_maximum_current = buf.get_f32_le();
6560        __struct.nominal_voltage = buf.get_f32_le();
6561        __struct.discharge_maximum_current = buf.get_f32_le();
6562        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6563        __struct.design_capacity = buf.get_f32_le();
6564        __struct.full_charge_capacity = buf.get_f32_le();
6565        __struct.cycle_count = buf.get_u16_le();
6566        __struct.weight = buf.get_u16_le();
6567        __struct.id = buf.get_u8();
6568        let tmp = buf.get_u8();
6569        __struct.battery_function =
6570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6571                enum_type: "MavBatteryFunction",
6572                value: tmp as u64,
6573            })?;
6574        let tmp = buf.get_u8();
6575        __struct.mavtype =
6576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6577                enum_type: "MavBatteryType",
6578                value: tmp as u64,
6579            })?;
6580        __struct.state_of_health = buf.get_u8();
6581        __struct.cells_in_series = buf.get_u8();
6582        let mut tmp = [0_u8; 9usize];
6583        for v in &mut tmp {
6584            *v = buf.get_u8();
6585        }
6586        __struct.manufacture_date = CharArray::new(tmp);
6587        let mut tmp = [0_u8; 32usize];
6588        for v in &mut tmp {
6589            *v = buf.get_u8();
6590        }
6591        __struct.serial_number = CharArray::new(tmp);
6592        let mut tmp = [0_u8; 50usize];
6593        for v in &mut tmp {
6594            *v = buf.get_u8();
6595        }
6596        __struct.name = CharArray::new(tmp);
6597        Ok(__struct)
6598    }
6599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6600        let mut __tmp = BytesMut::new(bytes);
6601        #[allow(clippy::absurd_extreme_comparisons)]
6602        #[allow(unused_comparisons)]
6603        if __tmp.remaining() < Self::ENCODED_LEN {
6604            panic!(
6605                "buffer is too small (need {} bytes, but got {})",
6606                Self::ENCODED_LEN,
6607                __tmp.remaining(),
6608            )
6609        }
6610        __tmp.put_f32_le(self.discharge_minimum_voltage);
6611        __tmp.put_f32_le(self.charging_minimum_voltage);
6612        __tmp.put_f32_le(self.resting_minimum_voltage);
6613        __tmp.put_f32_le(self.charging_maximum_voltage);
6614        __tmp.put_f32_le(self.charging_maximum_current);
6615        __tmp.put_f32_le(self.nominal_voltage);
6616        __tmp.put_f32_le(self.discharge_maximum_current);
6617        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6618        __tmp.put_f32_le(self.design_capacity);
6619        __tmp.put_f32_le(self.full_charge_capacity);
6620        __tmp.put_u16_le(self.cycle_count);
6621        __tmp.put_u16_le(self.weight);
6622        __tmp.put_u8(self.id);
6623        __tmp.put_u8(self.battery_function as u8);
6624        __tmp.put_u8(self.mavtype as u8);
6625        __tmp.put_u8(self.state_of_health);
6626        __tmp.put_u8(self.cells_in_series);
6627        for val in &self.manufacture_date {
6628            __tmp.put_u8(*val);
6629        }
6630        for val in &self.serial_number {
6631            __tmp.put_u8(*val);
6632        }
6633        for val in &self.name {
6634            __tmp.put_u8(*val);
6635        }
6636        if matches!(version, MavlinkVersion::V2) {
6637            let len = __tmp.len();
6638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6639        } else {
6640            __tmp.len()
6641        }
6642    }
6643}
6644#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6645#[doc = ""]
6646#[doc = "ID: 147"]
6647#[derive(Debug, Clone, PartialEq)]
6648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6650#[cfg_attr(feature = "ts", derive(TS))]
6651#[cfg_attr(feature = "ts", ts(export))]
6652pub struct BATTERY_STATUS_DATA {
6653    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6654    pub current_consumed: i32,
6655    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6656    pub energy_consumed: i32,
6657    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6658    pub temperature: i16,
6659    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6661    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6662    pub voltages: [u16; 10],
6663    #[doc = "Battery current, -1: autopilot does not measure the current"]
6664    pub current_battery: i16,
6665    #[doc = "Battery ID"]
6666    pub id: u8,
6667    #[doc = "Function of the battery"]
6668    pub battery_function: MavBatteryFunction,
6669    #[doc = "Type (chemistry) of the battery"]
6670    pub mavtype: MavBatteryType,
6671    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6672    pub battery_remaining: i8,
6673    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6674    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6675    pub time_remaining: i32,
6676    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6677    #[cfg_attr(feature = "serde", serde(default))]
6678    pub charge_state: MavBatteryChargeState,
6679    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6680    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6683    pub voltages_ext: [u16; 4],
6684    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6685    #[cfg_attr(feature = "serde", serde(default))]
6686    pub mode: MavBatteryMode,
6687    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6688    #[cfg_attr(feature = "serde", serde(default))]
6689    pub fault_bitmask: MavBatteryFault,
6690}
6691impl BATTERY_STATUS_DATA {
6692    pub const ENCODED_LEN: usize = 54usize;
6693    pub const DEFAULT: Self = Self {
6694        current_consumed: 0_i32,
6695        energy_consumed: 0_i32,
6696        temperature: 0_i16,
6697        voltages: [0_u16; 10usize],
6698        current_battery: 0_i16,
6699        id: 0_u8,
6700        battery_function: MavBatteryFunction::DEFAULT,
6701        mavtype: MavBatteryType::DEFAULT,
6702        battery_remaining: 0_i8,
6703        time_remaining: 0_i32,
6704        charge_state: MavBatteryChargeState::DEFAULT,
6705        voltages_ext: [0_u16; 4usize],
6706        mode: MavBatteryMode::DEFAULT,
6707        fault_bitmask: MavBatteryFault::DEFAULT,
6708    };
6709    #[cfg(feature = "arbitrary")]
6710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6711        use arbitrary::{Arbitrary, Unstructured};
6712        let mut buf = [0u8; 1024];
6713        rng.fill_bytes(&mut buf);
6714        let mut unstructured = Unstructured::new(&buf);
6715        Self::arbitrary(&mut unstructured).unwrap_or_default()
6716    }
6717}
6718impl Default for BATTERY_STATUS_DATA {
6719    fn default() -> Self {
6720        Self::DEFAULT.clone()
6721    }
6722}
6723impl MessageData for BATTERY_STATUS_DATA {
6724    type Message = MavMessage;
6725    const ID: u32 = 147u32;
6726    const NAME: &'static str = "BATTERY_STATUS";
6727    const EXTRA_CRC: u8 = 154u8;
6728    const ENCODED_LEN: usize = 54usize;
6729    fn deser(
6730        _version: MavlinkVersion,
6731        __input: &[u8],
6732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6733        let avail_len = __input.len();
6734        let mut payload_buf = [0; Self::ENCODED_LEN];
6735        let mut buf = if avail_len < Self::ENCODED_LEN {
6736            payload_buf[0..avail_len].copy_from_slice(__input);
6737            Bytes::new(&payload_buf)
6738        } else {
6739            Bytes::new(__input)
6740        };
6741        let mut __struct = Self::default();
6742        __struct.current_consumed = buf.get_i32_le();
6743        __struct.energy_consumed = buf.get_i32_le();
6744        __struct.temperature = buf.get_i16_le();
6745        for v in &mut __struct.voltages {
6746            let val = buf.get_u16_le();
6747            *v = val;
6748        }
6749        __struct.current_battery = buf.get_i16_le();
6750        __struct.id = buf.get_u8();
6751        let tmp = buf.get_u8();
6752        __struct.battery_function =
6753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6754                enum_type: "MavBatteryFunction",
6755                value: tmp as u64,
6756            })?;
6757        let tmp = buf.get_u8();
6758        __struct.mavtype =
6759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6760                enum_type: "MavBatteryType",
6761                value: tmp as u64,
6762            })?;
6763        __struct.battery_remaining = buf.get_i8();
6764        __struct.time_remaining = buf.get_i32_le();
6765        let tmp = buf.get_u8();
6766        __struct.charge_state =
6767            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6768                enum_type: "MavBatteryChargeState",
6769                value: tmp as u64,
6770            })?;
6771        for v in &mut __struct.voltages_ext {
6772            let val = buf.get_u16_le();
6773            *v = val;
6774        }
6775        let tmp = buf.get_u8();
6776        __struct.mode =
6777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6778                enum_type: "MavBatteryMode",
6779                value: tmp as u64,
6780            })?;
6781        let tmp = buf.get_u32_le();
6782        __struct.fault_bitmask = MavBatteryFault::from_bits(
6783            tmp as <MavBatteryFault as Flags>::Bits,
6784        )
6785        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6786            flag_type: "MavBatteryFault",
6787            value: tmp as u64,
6788        })?;
6789        Ok(__struct)
6790    }
6791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6792        let mut __tmp = BytesMut::new(bytes);
6793        #[allow(clippy::absurd_extreme_comparisons)]
6794        #[allow(unused_comparisons)]
6795        if __tmp.remaining() < Self::ENCODED_LEN {
6796            panic!(
6797                "buffer is too small (need {} bytes, but got {})",
6798                Self::ENCODED_LEN,
6799                __tmp.remaining(),
6800            )
6801        }
6802        __tmp.put_i32_le(self.current_consumed);
6803        __tmp.put_i32_le(self.energy_consumed);
6804        __tmp.put_i16_le(self.temperature);
6805        for val in &self.voltages {
6806            __tmp.put_u16_le(*val);
6807        }
6808        __tmp.put_i16_le(self.current_battery);
6809        __tmp.put_u8(self.id);
6810        __tmp.put_u8(self.battery_function as u8);
6811        __tmp.put_u8(self.mavtype as u8);
6812        __tmp.put_i8(self.battery_remaining);
6813        if matches!(version, MavlinkVersion::V2) {
6814            __tmp.put_i32_le(self.time_remaining);
6815            __tmp.put_u8(self.charge_state as u8);
6816            for val in &self.voltages_ext {
6817                __tmp.put_u16_le(*val);
6818            }
6819            __tmp.put_u8(self.mode as u8);
6820            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
6821            let len = __tmp.len();
6822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6823        } else {
6824            __tmp.len()
6825        }
6826    }
6827}
6828#[doc = "Report button state change."]
6829#[doc = ""]
6830#[doc = "ID: 257"]
6831#[derive(Debug, Clone, PartialEq)]
6832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6834#[cfg_attr(feature = "ts", derive(TS))]
6835#[cfg_attr(feature = "ts", ts(export))]
6836pub struct BUTTON_CHANGE_DATA {
6837    #[doc = "Timestamp (time since system boot)."]
6838    pub time_boot_ms: u32,
6839    #[doc = "Time of last change of button state."]
6840    pub last_change_ms: u32,
6841    #[doc = "Bitmap for state of buttons."]
6842    pub state: u8,
6843}
6844impl BUTTON_CHANGE_DATA {
6845    pub const ENCODED_LEN: usize = 9usize;
6846    pub const DEFAULT: Self = Self {
6847        time_boot_ms: 0_u32,
6848        last_change_ms: 0_u32,
6849        state: 0_u8,
6850    };
6851    #[cfg(feature = "arbitrary")]
6852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6853        use arbitrary::{Arbitrary, Unstructured};
6854        let mut buf = [0u8; 1024];
6855        rng.fill_bytes(&mut buf);
6856        let mut unstructured = Unstructured::new(&buf);
6857        Self::arbitrary(&mut unstructured).unwrap_or_default()
6858    }
6859}
6860impl Default for BUTTON_CHANGE_DATA {
6861    fn default() -> Self {
6862        Self::DEFAULT.clone()
6863    }
6864}
6865impl MessageData for BUTTON_CHANGE_DATA {
6866    type Message = MavMessage;
6867    const ID: u32 = 257u32;
6868    const NAME: &'static str = "BUTTON_CHANGE";
6869    const EXTRA_CRC: u8 = 131u8;
6870    const ENCODED_LEN: usize = 9usize;
6871    fn deser(
6872        _version: MavlinkVersion,
6873        __input: &[u8],
6874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6875        let avail_len = __input.len();
6876        let mut payload_buf = [0; Self::ENCODED_LEN];
6877        let mut buf = if avail_len < Self::ENCODED_LEN {
6878            payload_buf[0..avail_len].copy_from_slice(__input);
6879            Bytes::new(&payload_buf)
6880        } else {
6881            Bytes::new(__input)
6882        };
6883        let mut __struct = Self::default();
6884        __struct.time_boot_ms = buf.get_u32_le();
6885        __struct.last_change_ms = buf.get_u32_le();
6886        __struct.state = buf.get_u8();
6887        Ok(__struct)
6888    }
6889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6890        let mut __tmp = BytesMut::new(bytes);
6891        #[allow(clippy::absurd_extreme_comparisons)]
6892        #[allow(unused_comparisons)]
6893        if __tmp.remaining() < Self::ENCODED_LEN {
6894            panic!(
6895                "buffer is too small (need {} bytes, but got {})",
6896                Self::ENCODED_LEN,
6897                __tmp.remaining(),
6898            )
6899        }
6900        __tmp.put_u32_le(self.time_boot_ms);
6901        __tmp.put_u32_le(self.last_change_ms);
6902        __tmp.put_u8(self.state);
6903        if matches!(version, MavlinkVersion::V2) {
6904            let len = __tmp.len();
6905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6906        } else {
6907            __tmp.len()
6908        }
6909    }
6910}
6911#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6912#[doc = ""]
6913#[doc = "ID: 262"]
6914#[derive(Debug, Clone, PartialEq)]
6915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6917#[cfg_attr(feature = "ts", derive(TS))]
6918#[cfg_attr(feature = "ts", ts(export))]
6919pub struct CAMERA_CAPTURE_STATUS_DATA {
6920    #[doc = "Timestamp (time since system boot)."]
6921    pub time_boot_ms: u32,
6922    #[doc = "Image capture interval"]
6923    pub image_interval: f32,
6924    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6925    pub recording_time_ms: u32,
6926    #[doc = "Available storage capacity."]
6927    pub available_capacity: f32,
6928    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6929    pub image_status: u8,
6930    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6931    pub video_status: u8,
6932    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6934    pub image_count: i32,
6935    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6937    pub camera_device_id: u8,
6938}
6939impl CAMERA_CAPTURE_STATUS_DATA {
6940    pub const ENCODED_LEN: usize = 23usize;
6941    pub const DEFAULT: Self = Self {
6942        time_boot_ms: 0_u32,
6943        image_interval: 0.0_f32,
6944        recording_time_ms: 0_u32,
6945        available_capacity: 0.0_f32,
6946        image_status: 0_u8,
6947        video_status: 0_u8,
6948        image_count: 0_i32,
6949        camera_device_id: 0_u8,
6950    };
6951    #[cfg(feature = "arbitrary")]
6952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6953        use arbitrary::{Arbitrary, Unstructured};
6954        let mut buf = [0u8; 1024];
6955        rng.fill_bytes(&mut buf);
6956        let mut unstructured = Unstructured::new(&buf);
6957        Self::arbitrary(&mut unstructured).unwrap_or_default()
6958    }
6959}
6960impl Default for CAMERA_CAPTURE_STATUS_DATA {
6961    fn default() -> Self {
6962        Self::DEFAULT.clone()
6963    }
6964}
6965impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6966    type Message = MavMessage;
6967    const ID: u32 = 262u32;
6968    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6969    const EXTRA_CRC: u8 = 12u8;
6970    const ENCODED_LEN: usize = 23usize;
6971    fn deser(
6972        _version: MavlinkVersion,
6973        __input: &[u8],
6974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6975        let avail_len = __input.len();
6976        let mut payload_buf = [0; Self::ENCODED_LEN];
6977        let mut buf = if avail_len < Self::ENCODED_LEN {
6978            payload_buf[0..avail_len].copy_from_slice(__input);
6979            Bytes::new(&payload_buf)
6980        } else {
6981            Bytes::new(__input)
6982        };
6983        let mut __struct = Self::default();
6984        __struct.time_boot_ms = buf.get_u32_le();
6985        __struct.image_interval = buf.get_f32_le();
6986        __struct.recording_time_ms = buf.get_u32_le();
6987        __struct.available_capacity = buf.get_f32_le();
6988        __struct.image_status = buf.get_u8();
6989        __struct.video_status = buf.get_u8();
6990        __struct.image_count = buf.get_i32_le();
6991        __struct.camera_device_id = buf.get_u8();
6992        Ok(__struct)
6993    }
6994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6995        let mut __tmp = BytesMut::new(bytes);
6996        #[allow(clippy::absurd_extreme_comparisons)]
6997        #[allow(unused_comparisons)]
6998        if __tmp.remaining() < Self::ENCODED_LEN {
6999            panic!(
7000                "buffer is too small (need {} bytes, but got {})",
7001                Self::ENCODED_LEN,
7002                __tmp.remaining(),
7003            )
7004        }
7005        __tmp.put_u32_le(self.time_boot_ms);
7006        __tmp.put_f32_le(self.image_interval);
7007        __tmp.put_u32_le(self.recording_time_ms);
7008        __tmp.put_f32_le(self.available_capacity);
7009        __tmp.put_u8(self.image_status);
7010        __tmp.put_u8(self.video_status);
7011        if matches!(version, MavlinkVersion::V2) {
7012            __tmp.put_i32_le(self.image_count);
7013            __tmp.put_u8(self.camera_device_id);
7014            let len = __tmp.len();
7015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7016        } else {
7017            __tmp.len()
7018        }
7019    }
7020}
7021#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7022#[doc = ""]
7023#[doc = "ID: 271"]
7024#[derive(Debug, Clone, PartialEq)]
7025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7027#[cfg_attr(feature = "ts", derive(TS))]
7028#[cfg_attr(feature = "ts", ts(export))]
7029pub struct CAMERA_FOV_STATUS_DATA {
7030    #[doc = "Timestamp (time since system boot)."]
7031    pub time_boot_ms: u32,
7032    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7033    pub lat_camera: i32,
7034    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7035    pub lon_camera: i32,
7036    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7037    pub alt_camera: i32,
7038    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7039    pub lat_image: i32,
7040    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7041    pub lon_image: i32,
7042    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7043    pub alt_image: i32,
7044    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7045    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7046    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7047    pub q: [f32; 4],
7048    #[doc = "Horizontal field of view (NaN if unknown)."]
7049    pub hfov: f32,
7050    #[doc = "Vertical field of view (NaN if unknown)."]
7051    pub vfov: f32,
7052    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7054    pub camera_device_id: u8,
7055}
7056impl CAMERA_FOV_STATUS_DATA {
7057    pub const ENCODED_LEN: usize = 53usize;
7058    pub const DEFAULT: Self = Self {
7059        time_boot_ms: 0_u32,
7060        lat_camera: 0_i32,
7061        lon_camera: 0_i32,
7062        alt_camera: 0_i32,
7063        lat_image: 0_i32,
7064        lon_image: 0_i32,
7065        alt_image: 0_i32,
7066        q: [0.0_f32; 4usize],
7067        hfov: 0.0_f32,
7068        vfov: 0.0_f32,
7069        camera_device_id: 0_u8,
7070    };
7071    #[cfg(feature = "arbitrary")]
7072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7073        use arbitrary::{Arbitrary, Unstructured};
7074        let mut buf = [0u8; 1024];
7075        rng.fill_bytes(&mut buf);
7076        let mut unstructured = Unstructured::new(&buf);
7077        Self::arbitrary(&mut unstructured).unwrap_or_default()
7078    }
7079}
7080impl Default for CAMERA_FOV_STATUS_DATA {
7081    fn default() -> Self {
7082        Self::DEFAULT.clone()
7083    }
7084}
7085impl MessageData for CAMERA_FOV_STATUS_DATA {
7086    type Message = MavMessage;
7087    const ID: u32 = 271u32;
7088    const NAME: &'static str = "CAMERA_FOV_STATUS";
7089    const EXTRA_CRC: u8 = 22u8;
7090    const ENCODED_LEN: usize = 53usize;
7091    fn deser(
7092        _version: MavlinkVersion,
7093        __input: &[u8],
7094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7095        let avail_len = __input.len();
7096        let mut payload_buf = [0; Self::ENCODED_LEN];
7097        let mut buf = if avail_len < Self::ENCODED_LEN {
7098            payload_buf[0..avail_len].copy_from_slice(__input);
7099            Bytes::new(&payload_buf)
7100        } else {
7101            Bytes::new(__input)
7102        };
7103        let mut __struct = Self::default();
7104        __struct.time_boot_ms = buf.get_u32_le();
7105        __struct.lat_camera = buf.get_i32_le();
7106        __struct.lon_camera = buf.get_i32_le();
7107        __struct.alt_camera = buf.get_i32_le();
7108        __struct.lat_image = buf.get_i32_le();
7109        __struct.lon_image = buf.get_i32_le();
7110        __struct.alt_image = buf.get_i32_le();
7111        for v in &mut __struct.q {
7112            let val = buf.get_f32_le();
7113            *v = val;
7114        }
7115        __struct.hfov = buf.get_f32_le();
7116        __struct.vfov = buf.get_f32_le();
7117        __struct.camera_device_id = buf.get_u8();
7118        Ok(__struct)
7119    }
7120    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7121        let mut __tmp = BytesMut::new(bytes);
7122        #[allow(clippy::absurd_extreme_comparisons)]
7123        #[allow(unused_comparisons)]
7124        if __tmp.remaining() < Self::ENCODED_LEN {
7125            panic!(
7126                "buffer is too small (need {} bytes, but got {})",
7127                Self::ENCODED_LEN,
7128                __tmp.remaining(),
7129            )
7130        }
7131        __tmp.put_u32_le(self.time_boot_ms);
7132        __tmp.put_i32_le(self.lat_camera);
7133        __tmp.put_i32_le(self.lon_camera);
7134        __tmp.put_i32_le(self.alt_camera);
7135        __tmp.put_i32_le(self.lat_image);
7136        __tmp.put_i32_le(self.lon_image);
7137        __tmp.put_i32_le(self.alt_image);
7138        for val in &self.q {
7139            __tmp.put_f32_le(*val);
7140        }
7141        __tmp.put_f32_le(self.hfov);
7142        __tmp.put_f32_le(self.vfov);
7143        if matches!(version, MavlinkVersion::V2) {
7144            __tmp.put_u8(self.camera_device_id);
7145            let len = __tmp.len();
7146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7147        } else {
7148            __tmp.len()
7149        }
7150    }
7151}
7152#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7153#[doc = ""]
7154#[doc = "ID: 263"]
7155#[derive(Debug, Clone, PartialEq)]
7156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7158#[cfg_attr(feature = "ts", derive(TS))]
7159#[cfg_attr(feature = "ts", ts(export))]
7160pub struct CAMERA_IMAGE_CAPTURED_DATA {
7161    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7162    pub time_utc: u64,
7163    #[doc = "Timestamp (time since system boot)."]
7164    pub time_boot_ms: u32,
7165    #[doc = "Latitude where image was taken"]
7166    pub lat: i32,
7167    #[doc = "Longitude where capture was taken"]
7168    pub lon: i32,
7169    #[doc = "Altitude (MSL) where image was taken"]
7170    pub alt: i32,
7171    #[doc = "Altitude above ground"]
7172    pub relative_alt: i32,
7173    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7176    pub q: [f32; 4],
7177    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7178    pub image_index: i32,
7179    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7180    pub camera_id: u8,
7181    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7182    pub capture_result: i8,
7183    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7184    #[cfg_attr(feature = "ts", ts(type = "string"))]
7185    pub file_url: CharArray<205>,
7186}
7187impl CAMERA_IMAGE_CAPTURED_DATA {
7188    pub const ENCODED_LEN: usize = 255usize;
7189    pub const DEFAULT: Self = Self {
7190        time_utc: 0_u64,
7191        time_boot_ms: 0_u32,
7192        lat: 0_i32,
7193        lon: 0_i32,
7194        alt: 0_i32,
7195        relative_alt: 0_i32,
7196        q: [0.0_f32; 4usize],
7197        image_index: 0_i32,
7198        camera_id: 0_u8,
7199        capture_result: 0_i8,
7200        file_url: CharArray::new([0_u8; 205usize]),
7201    };
7202    #[cfg(feature = "arbitrary")]
7203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7204        use arbitrary::{Arbitrary, Unstructured};
7205        let mut buf = [0u8; 1024];
7206        rng.fill_bytes(&mut buf);
7207        let mut unstructured = Unstructured::new(&buf);
7208        Self::arbitrary(&mut unstructured).unwrap_or_default()
7209    }
7210}
7211impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7212    fn default() -> Self {
7213        Self::DEFAULT.clone()
7214    }
7215}
7216impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7217    type Message = MavMessage;
7218    const ID: u32 = 263u32;
7219    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7220    const EXTRA_CRC: u8 = 133u8;
7221    const ENCODED_LEN: usize = 255usize;
7222    fn deser(
7223        _version: MavlinkVersion,
7224        __input: &[u8],
7225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7226        let avail_len = __input.len();
7227        let mut payload_buf = [0; Self::ENCODED_LEN];
7228        let mut buf = if avail_len < Self::ENCODED_LEN {
7229            payload_buf[0..avail_len].copy_from_slice(__input);
7230            Bytes::new(&payload_buf)
7231        } else {
7232            Bytes::new(__input)
7233        };
7234        let mut __struct = Self::default();
7235        __struct.time_utc = buf.get_u64_le();
7236        __struct.time_boot_ms = buf.get_u32_le();
7237        __struct.lat = buf.get_i32_le();
7238        __struct.lon = buf.get_i32_le();
7239        __struct.alt = buf.get_i32_le();
7240        __struct.relative_alt = buf.get_i32_le();
7241        for v in &mut __struct.q {
7242            let val = buf.get_f32_le();
7243            *v = val;
7244        }
7245        __struct.image_index = buf.get_i32_le();
7246        __struct.camera_id = buf.get_u8();
7247        __struct.capture_result = buf.get_i8();
7248        let mut tmp = [0_u8; 205usize];
7249        for v in &mut tmp {
7250            *v = buf.get_u8();
7251        }
7252        __struct.file_url = CharArray::new(tmp);
7253        Ok(__struct)
7254    }
7255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7256        let mut __tmp = BytesMut::new(bytes);
7257        #[allow(clippy::absurd_extreme_comparisons)]
7258        #[allow(unused_comparisons)]
7259        if __tmp.remaining() < Self::ENCODED_LEN {
7260            panic!(
7261                "buffer is too small (need {} bytes, but got {})",
7262                Self::ENCODED_LEN,
7263                __tmp.remaining(),
7264            )
7265        }
7266        __tmp.put_u64_le(self.time_utc);
7267        __tmp.put_u32_le(self.time_boot_ms);
7268        __tmp.put_i32_le(self.lat);
7269        __tmp.put_i32_le(self.lon);
7270        __tmp.put_i32_le(self.alt);
7271        __tmp.put_i32_le(self.relative_alt);
7272        for val in &self.q {
7273            __tmp.put_f32_le(*val);
7274        }
7275        __tmp.put_i32_le(self.image_index);
7276        __tmp.put_u8(self.camera_id);
7277        __tmp.put_i8(self.capture_result);
7278        for val in &self.file_url {
7279            __tmp.put_u8(*val);
7280        }
7281        if matches!(version, MavlinkVersion::V2) {
7282            let len = __tmp.len();
7283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7284        } else {
7285            __tmp.len()
7286        }
7287    }
7288}
7289#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7290#[doc = ""]
7291#[doc = "ID: 259"]
7292#[derive(Debug, Clone, PartialEq)]
7293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7295#[cfg_attr(feature = "ts", derive(TS))]
7296#[cfg_attr(feature = "ts", ts(export))]
7297pub struct CAMERA_INFORMATION_DATA {
7298    #[doc = "Timestamp (time since system boot)."]
7299    pub time_boot_ms: u32,
7300    #[doc = "0xff). Use 0 if not known."]
7301    pub firmware_version: u32,
7302    #[doc = "Focal length. Use NaN if not known."]
7303    pub focal_length: f32,
7304    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7305    pub sensor_size_h: f32,
7306    #[doc = "Image sensor size vertical. Use NaN if not known."]
7307    pub sensor_size_v: f32,
7308    #[doc = "Bitmap of camera capability flags."]
7309    pub flags: CameraCapFlags,
7310    #[doc = "Horizontal image resolution. Use 0 if not known."]
7311    pub resolution_h: u16,
7312    #[doc = "Vertical image resolution. Use 0 if not known."]
7313    pub resolution_v: u16,
7314    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7315    pub cam_definition_version: u16,
7316    #[doc = "Name of the camera vendor"]
7317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7318    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7319    pub vendor_name: [u8; 32],
7320    #[doc = "Name of the camera model"]
7321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7322    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7323    pub model_name: [u8; 32],
7324    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7325    pub lens_id: u8,
7326    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7327    #[cfg_attr(feature = "ts", ts(type = "string"))]
7328    pub cam_definition_uri: CharArray<140>,
7329    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7331    pub gimbal_device_id: u8,
7332    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7334    pub camera_device_id: u8,
7335}
7336impl CAMERA_INFORMATION_DATA {
7337    pub const ENCODED_LEN: usize = 237usize;
7338    pub const DEFAULT: Self = Self {
7339        time_boot_ms: 0_u32,
7340        firmware_version: 0_u32,
7341        focal_length: 0.0_f32,
7342        sensor_size_h: 0.0_f32,
7343        sensor_size_v: 0.0_f32,
7344        flags: CameraCapFlags::DEFAULT,
7345        resolution_h: 0_u16,
7346        resolution_v: 0_u16,
7347        cam_definition_version: 0_u16,
7348        vendor_name: [0_u8; 32usize],
7349        model_name: [0_u8; 32usize],
7350        lens_id: 0_u8,
7351        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7352        gimbal_device_id: 0_u8,
7353        camera_device_id: 0_u8,
7354    };
7355    #[cfg(feature = "arbitrary")]
7356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7357        use arbitrary::{Arbitrary, Unstructured};
7358        let mut buf = [0u8; 1024];
7359        rng.fill_bytes(&mut buf);
7360        let mut unstructured = Unstructured::new(&buf);
7361        Self::arbitrary(&mut unstructured).unwrap_or_default()
7362    }
7363}
7364impl Default for CAMERA_INFORMATION_DATA {
7365    fn default() -> Self {
7366        Self::DEFAULT.clone()
7367    }
7368}
7369impl MessageData for CAMERA_INFORMATION_DATA {
7370    type Message = MavMessage;
7371    const ID: u32 = 259u32;
7372    const NAME: &'static str = "CAMERA_INFORMATION";
7373    const EXTRA_CRC: u8 = 92u8;
7374    const ENCODED_LEN: usize = 237usize;
7375    fn deser(
7376        _version: MavlinkVersion,
7377        __input: &[u8],
7378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7379        let avail_len = __input.len();
7380        let mut payload_buf = [0; Self::ENCODED_LEN];
7381        let mut buf = if avail_len < Self::ENCODED_LEN {
7382            payload_buf[0..avail_len].copy_from_slice(__input);
7383            Bytes::new(&payload_buf)
7384        } else {
7385            Bytes::new(__input)
7386        };
7387        let mut __struct = Self::default();
7388        __struct.time_boot_ms = buf.get_u32_le();
7389        __struct.firmware_version = buf.get_u32_le();
7390        __struct.focal_length = buf.get_f32_le();
7391        __struct.sensor_size_h = buf.get_f32_le();
7392        __struct.sensor_size_v = buf.get_f32_le();
7393        let tmp = buf.get_u32_le();
7394        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7395            ::mavlink_core::error::ParserError::InvalidFlag {
7396                flag_type: "CameraCapFlags",
7397                value: tmp as u64,
7398            },
7399        )?;
7400        __struct.resolution_h = buf.get_u16_le();
7401        __struct.resolution_v = buf.get_u16_le();
7402        __struct.cam_definition_version = buf.get_u16_le();
7403        for v in &mut __struct.vendor_name {
7404            let val = buf.get_u8();
7405            *v = val;
7406        }
7407        for v in &mut __struct.model_name {
7408            let val = buf.get_u8();
7409            *v = val;
7410        }
7411        __struct.lens_id = buf.get_u8();
7412        let mut tmp = [0_u8; 140usize];
7413        for v in &mut tmp {
7414            *v = buf.get_u8();
7415        }
7416        __struct.cam_definition_uri = CharArray::new(tmp);
7417        __struct.gimbal_device_id = buf.get_u8();
7418        __struct.camera_device_id = buf.get_u8();
7419        Ok(__struct)
7420    }
7421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7422        let mut __tmp = BytesMut::new(bytes);
7423        #[allow(clippy::absurd_extreme_comparisons)]
7424        #[allow(unused_comparisons)]
7425        if __tmp.remaining() < Self::ENCODED_LEN {
7426            panic!(
7427                "buffer is too small (need {} bytes, but got {})",
7428                Self::ENCODED_LEN,
7429                __tmp.remaining(),
7430            )
7431        }
7432        __tmp.put_u32_le(self.time_boot_ms);
7433        __tmp.put_u32_le(self.firmware_version);
7434        __tmp.put_f32_le(self.focal_length);
7435        __tmp.put_f32_le(self.sensor_size_h);
7436        __tmp.put_f32_le(self.sensor_size_v);
7437        __tmp.put_u32_le(self.flags.bits() as u32);
7438        __tmp.put_u16_le(self.resolution_h);
7439        __tmp.put_u16_le(self.resolution_v);
7440        __tmp.put_u16_le(self.cam_definition_version);
7441        for val in &self.vendor_name {
7442            __tmp.put_u8(*val);
7443        }
7444        for val in &self.model_name {
7445            __tmp.put_u8(*val);
7446        }
7447        __tmp.put_u8(self.lens_id);
7448        for val in &self.cam_definition_uri {
7449            __tmp.put_u8(*val);
7450        }
7451        if matches!(version, MavlinkVersion::V2) {
7452            __tmp.put_u8(self.gimbal_device_id);
7453            __tmp.put_u8(self.camera_device_id);
7454            let len = __tmp.len();
7455            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7456        } else {
7457            __tmp.len()
7458        }
7459    }
7460}
7461#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7462#[doc = ""]
7463#[doc = "ID: 260"]
7464#[derive(Debug, Clone, PartialEq)]
7465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7467#[cfg_attr(feature = "ts", derive(TS))]
7468#[cfg_attr(feature = "ts", ts(export))]
7469pub struct CAMERA_SETTINGS_DATA {
7470    #[doc = "Timestamp (time since system boot)."]
7471    pub time_boot_ms: u32,
7472    #[doc = "Camera mode"]
7473    pub mode_id: CameraMode,
7474    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7476    pub zoomLevel: f32,
7477    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7479    pub focusLevel: f32,
7480    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7482    pub camera_device_id: u8,
7483}
7484impl CAMERA_SETTINGS_DATA {
7485    pub const ENCODED_LEN: usize = 14usize;
7486    pub const DEFAULT: Self = Self {
7487        time_boot_ms: 0_u32,
7488        mode_id: CameraMode::DEFAULT,
7489        zoomLevel: 0.0_f32,
7490        focusLevel: 0.0_f32,
7491        camera_device_id: 0_u8,
7492    };
7493    #[cfg(feature = "arbitrary")]
7494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7495        use arbitrary::{Arbitrary, Unstructured};
7496        let mut buf = [0u8; 1024];
7497        rng.fill_bytes(&mut buf);
7498        let mut unstructured = Unstructured::new(&buf);
7499        Self::arbitrary(&mut unstructured).unwrap_or_default()
7500    }
7501}
7502impl Default for CAMERA_SETTINGS_DATA {
7503    fn default() -> Self {
7504        Self::DEFAULT.clone()
7505    }
7506}
7507impl MessageData for CAMERA_SETTINGS_DATA {
7508    type Message = MavMessage;
7509    const ID: u32 = 260u32;
7510    const NAME: &'static str = "CAMERA_SETTINGS";
7511    const EXTRA_CRC: u8 = 146u8;
7512    const ENCODED_LEN: usize = 14usize;
7513    fn deser(
7514        _version: MavlinkVersion,
7515        __input: &[u8],
7516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7517        let avail_len = __input.len();
7518        let mut payload_buf = [0; Self::ENCODED_LEN];
7519        let mut buf = if avail_len < Self::ENCODED_LEN {
7520            payload_buf[0..avail_len].copy_from_slice(__input);
7521            Bytes::new(&payload_buf)
7522        } else {
7523            Bytes::new(__input)
7524        };
7525        let mut __struct = Self::default();
7526        __struct.time_boot_ms = buf.get_u32_le();
7527        let tmp = buf.get_u8();
7528        __struct.mode_id =
7529            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7530                enum_type: "CameraMode",
7531                value: tmp as u64,
7532            })?;
7533        __struct.zoomLevel = buf.get_f32_le();
7534        __struct.focusLevel = buf.get_f32_le();
7535        __struct.camera_device_id = buf.get_u8();
7536        Ok(__struct)
7537    }
7538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7539        let mut __tmp = BytesMut::new(bytes);
7540        #[allow(clippy::absurd_extreme_comparisons)]
7541        #[allow(unused_comparisons)]
7542        if __tmp.remaining() < Self::ENCODED_LEN {
7543            panic!(
7544                "buffer is too small (need {} bytes, but got {})",
7545                Self::ENCODED_LEN,
7546                __tmp.remaining(),
7547            )
7548        }
7549        __tmp.put_u32_le(self.time_boot_ms);
7550        __tmp.put_u8(self.mode_id as u8);
7551        if matches!(version, MavlinkVersion::V2) {
7552            __tmp.put_f32_le(self.zoomLevel);
7553            __tmp.put_f32_le(self.focusLevel);
7554            __tmp.put_u8(self.camera_device_id);
7555            let len = __tmp.len();
7556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7557        } else {
7558            __tmp.len()
7559        }
7560    }
7561}
7562#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7563#[doc = ""]
7564#[doc = "ID: 277"]
7565#[derive(Debug, Clone, PartialEq)]
7566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7568#[cfg_attr(feature = "ts", derive(TS))]
7569#[cfg_attr(feature = "ts", ts(export))]
7570pub struct CAMERA_THERMAL_RANGE_DATA {
7571    #[doc = "Timestamp (time since system boot)."]
7572    pub time_boot_ms: u32,
7573    #[doc = "Temperature max."]
7574    pub max: f32,
7575    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7576    pub max_point_x: f32,
7577    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7578    pub max_point_y: f32,
7579    #[doc = "Temperature min."]
7580    pub min: f32,
7581    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7582    pub min_point_x: f32,
7583    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7584    pub min_point_y: f32,
7585    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7586    pub stream_id: u8,
7587    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7588    pub camera_device_id: u8,
7589}
7590impl CAMERA_THERMAL_RANGE_DATA {
7591    pub const ENCODED_LEN: usize = 30usize;
7592    pub const DEFAULT: Self = Self {
7593        time_boot_ms: 0_u32,
7594        max: 0.0_f32,
7595        max_point_x: 0.0_f32,
7596        max_point_y: 0.0_f32,
7597        min: 0.0_f32,
7598        min_point_x: 0.0_f32,
7599        min_point_y: 0.0_f32,
7600        stream_id: 0_u8,
7601        camera_device_id: 0_u8,
7602    };
7603    #[cfg(feature = "arbitrary")]
7604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7605        use arbitrary::{Arbitrary, Unstructured};
7606        let mut buf = [0u8; 1024];
7607        rng.fill_bytes(&mut buf);
7608        let mut unstructured = Unstructured::new(&buf);
7609        Self::arbitrary(&mut unstructured).unwrap_or_default()
7610    }
7611}
7612impl Default for CAMERA_THERMAL_RANGE_DATA {
7613    fn default() -> Self {
7614        Self::DEFAULT.clone()
7615    }
7616}
7617impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7618    type Message = MavMessage;
7619    const ID: u32 = 277u32;
7620    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7621    const EXTRA_CRC: u8 = 62u8;
7622    const ENCODED_LEN: usize = 30usize;
7623    fn deser(
7624        _version: MavlinkVersion,
7625        __input: &[u8],
7626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7627        let avail_len = __input.len();
7628        let mut payload_buf = [0; Self::ENCODED_LEN];
7629        let mut buf = if avail_len < Self::ENCODED_LEN {
7630            payload_buf[0..avail_len].copy_from_slice(__input);
7631            Bytes::new(&payload_buf)
7632        } else {
7633            Bytes::new(__input)
7634        };
7635        let mut __struct = Self::default();
7636        __struct.time_boot_ms = buf.get_u32_le();
7637        __struct.max = buf.get_f32_le();
7638        __struct.max_point_x = buf.get_f32_le();
7639        __struct.max_point_y = buf.get_f32_le();
7640        __struct.min = buf.get_f32_le();
7641        __struct.min_point_x = buf.get_f32_le();
7642        __struct.min_point_y = buf.get_f32_le();
7643        __struct.stream_id = buf.get_u8();
7644        __struct.camera_device_id = buf.get_u8();
7645        Ok(__struct)
7646    }
7647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7648        let mut __tmp = BytesMut::new(bytes);
7649        #[allow(clippy::absurd_extreme_comparisons)]
7650        #[allow(unused_comparisons)]
7651        if __tmp.remaining() < Self::ENCODED_LEN {
7652            panic!(
7653                "buffer is too small (need {} bytes, but got {})",
7654                Self::ENCODED_LEN,
7655                __tmp.remaining(),
7656            )
7657        }
7658        __tmp.put_u32_le(self.time_boot_ms);
7659        __tmp.put_f32_le(self.max);
7660        __tmp.put_f32_le(self.max_point_x);
7661        __tmp.put_f32_le(self.max_point_y);
7662        __tmp.put_f32_le(self.min);
7663        __tmp.put_f32_le(self.min_point_x);
7664        __tmp.put_f32_le(self.min_point_y);
7665        __tmp.put_u8(self.stream_id);
7666        __tmp.put_u8(self.camera_device_id);
7667        if matches!(version, MavlinkVersion::V2) {
7668            let len = __tmp.len();
7669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7670        } else {
7671            __tmp.len()
7672        }
7673    }
7674}
7675#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7676#[doc = ""]
7677#[doc = "ID: 276"]
7678#[derive(Debug, Clone, PartialEq)]
7679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7681#[cfg_attr(feature = "ts", derive(TS))]
7682#[cfg_attr(feature = "ts", ts(export))]
7683pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7684    #[doc = "Latitude of tracked object"]
7685    pub lat: i32,
7686    #[doc = "Longitude of tracked object"]
7687    pub lon: i32,
7688    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7689    pub alt: f32,
7690    #[doc = "Horizontal accuracy. NAN if unknown"]
7691    pub h_acc: f32,
7692    #[doc = "Vertical accuracy. NAN if unknown"]
7693    pub v_acc: f32,
7694    #[doc = "North velocity of tracked object. NAN if unknown"]
7695    pub vel_n: f32,
7696    #[doc = "East velocity of tracked object. NAN if unknown"]
7697    pub vel_e: f32,
7698    #[doc = "Down velocity of tracked object. NAN if unknown"]
7699    pub vel_d: f32,
7700    #[doc = "Velocity accuracy. NAN if unknown"]
7701    pub vel_acc: f32,
7702    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7703    pub dist: f32,
7704    #[doc = "Heading in radians, in NED. NAN if unknown"]
7705    pub hdg: f32,
7706    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7707    pub hdg_acc: f32,
7708    #[doc = "Current tracking status"]
7709    pub tracking_status: CameraTrackingStatusFlags,
7710    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7712    pub camera_device_id: u8,
7713}
7714impl CAMERA_TRACKING_GEO_STATUS_DATA {
7715    pub const ENCODED_LEN: usize = 50usize;
7716    pub const DEFAULT: Self = Self {
7717        lat: 0_i32,
7718        lon: 0_i32,
7719        alt: 0.0_f32,
7720        h_acc: 0.0_f32,
7721        v_acc: 0.0_f32,
7722        vel_n: 0.0_f32,
7723        vel_e: 0.0_f32,
7724        vel_d: 0.0_f32,
7725        vel_acc: 0.0_f32,
7726        dist: 0.0_f32,
7727        hdg: 0.0_f32,
7728        hdg_acc: 0.0_f32,
7729        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7730        camera_device_id: 0_u8,
7731    };
7732    #[cfg(feature = "arbitrary")]
7733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7734        use arbitrary::{Arbitrary, Unstructured};
7735        let mut buf = [0u8; 1024];
7736        rng.fill_bytes(&mut buf);
7737        let mut unstructured = Unstructured::new(&buf);
7738        Self::arbitrary(&mut unstructured).unwrap_or_default()
7739    }
7740}
7741impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7742    fn default() -> Self {
7743        Self::DEFAULT.clone()
7744    }
7745}
7746impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7747    type Message = MavMessage;
7748    const ID: u32 = 276u32;
7749    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7750    const EXTRA_CRC: u8 = 18u8;
7751    const ENCODED_LEN: usize = 50usize;
7752    fn deser(
7753        _version: MavlinkVersion,
7754        __input: &[u8],
7755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7756        let avail_len = __input.len();
7757        let mut payload_buf = [0; Self::ENCODED_LEN];
7758        let mut buf = if avail_len < Self::ENCODED_LEN {
7759            payload_buf[0..avail_len].copy_from_slice(__input);
7760            Bytes::new(&payload_buf)
7761        } else {
7762            Bytes::new(__input)
7763        };
7764        let mut __struct = Self::default();
7765        __struct.lat = buf.get_i32_le();
7766        __struct.lon = buf.get_i32_le();
7767        __struct.alt = buf.get_f32_le();
7768        __struct.h_acc = buf.get_f32_le();
7769        __struct.v_acc = buf.get_f32_le();
7770        __struct.vel_n = buf.get_f32_le();
7771        __struct.vel_e = buf.get_f32_le();
7772        __struct.vel_d = buf.get_f32_le();
7773        __struct.vel_acc = buf.get_f32_le();
7774        __struct.dist = buf.get_f32_le();
7775        __struct.hdg = buf.get_f32_le();
7776        __struct.hdg_acc = buf.get_f32_le();
7777        let tmp = buf.get_u8();
7778        __struct.tracking_status =
7779            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7780                enum_type: "CameraTrackingStatusFlags",
7781                value: tmp as u64,
7782            })?;
7783        __struct.camera_device_id = buf.get_u8();
7784        Ok(__struct)
7785    }
7786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7787        let mut __tmp = BytesMut::new(bytes);
7788        #[allow(clippy::absurd_extreme_comparisons)]
7789        #[allow(unused_comparisons)]
7790        if __tmp.remaining() < Self::ENCODED_LEN {
7791            panic!(
7792                "buffer is too small (need {} bytes, but got {})",
7793                Self::ENCODED_LEN,
7794                __tmp.remaining(),
7795            )
7796        }
7797        __tmp.put_i32_le(self.lat);
7798        __tmp.put_i32_le(self.lon);
7799        __tmp.put_f32_le(self.alt);
7800        __tmp.put_f32_le(self.h_acc);
7801        __tmp.put_f32_le(self.v_acc);
7802        __tmp.put_f32_le(self.vel_n);
7803        __tmp.put_f32_le(self.vel_e);
7804        __tmp.put_f32_le(self.vel_d);
7805        __tmp.put_f32_le(self.vel_acc);
7806        __tmp.put_f32_le(self.dist);
7807        __tmp.put_f32_le(self.hdg);
7808        __tmp.put_f32_le(self.hdg_acc);
7809        __tmp.put_u8(self.tracking_status as u8);
7810        if matches!(version, MavlinkVersion::V2) {
7811            __tmp.put_u8(self.camera_device_id);
7812            let len = __tmp.len();
7813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7814        } else {
7815            __tmp.len()
7816        }
7817    }
7818}
7819#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7820#[doc = ""]
7821#[doc = "ID: 275"]
7822#[derive(Debug, Clone, PartialEq)]
7823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7825#[cfg_attr(feature = "ts", derive(TS))]
7826#[cfg_attr(feature = "ts", ts(export))]
7827pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7828    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7829    pub point_x: f32,
7830    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7831    pub point_y: f32,
7832    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7833    pub radius: f32,
7834    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7835    pub rec_top_x: f32,
7836    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7837    pub rec_top_y: f32,
7838    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7839    pub rec_bottom_x: f32,
7840    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7841    pub rec_bottom_y: f32,
7842    #[doc = "Current tracking status"]
7843    pub tracking_status: CameraTrackingStatusFlags,
7844    #[doc = "Current tracking mode"]
7845    pub tracking_mode: CameraTrackingMode,
7846    #[doc = "Defines location of target data"]
7847    pub target_data: CameraTrackingTargetData,
7848    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7849    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7850    pub camera_device_id: u8,
7851}
7852impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7853    pub const ENCODED_LEN: usize = 32usize;
7854    pub const DEFAULT: Self = Self {
7855        point_x: 0.0_f32,
7856        point_y: 0.0_f32,
7857        radius: 0.0_f32,
7858        rec_top_x: 0.0_f32,
7859        rec_top_y: 0.0_f32,
7860        rec_bottom_x: 0.0_f32,
7861        rec_bottom_y: 0.0_f32,
7862        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7863        tracking_mode: CameraTrackingMode::DEFAULT,
7864        target_data: CameraTrackingTargetData::DEFAULT,
7865        camera_device_id: 0_u8,
7866    };
7867    #[cfg(feature = "arbitrary")]
7868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7869        use arbitrary::{Arbitrary, Unstructured};
7870        let mut buf = [0u8; 1024];
7871        rng.fill_bytes(&mut buf);
7872        let mut unstructured = Unstructured::new(&buf);
7873        Self::arbitrary(&mut unstructured).unwrap_or_default()
7874    }
7875}
7876impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7877    fn default() -> Self {
7878        Self::DEFAULT.clone()
7879    }
7880}
7881impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7882    type Message = MavMessage;
7883    const ID: u32 = 275u32;
7884    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7885    const EXTRA_CRC: u8 = 126u8;
7886    const ENCODED_LEN: usize = 32usize;
7887    fn deser(
7888        _version: MavlinkVersion,
7889        __input: &[u8],
7890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7891        let avail_len = __input.len();
7892        let mut payload_buf = [0; Self::ENCODED_LEN];
7893        let mut buf = if avail_len < Self::ENCODED_LEN {
7894            payload_buf[0..avail_len].copy_from_slice(__input);
7895            Bytes::new(&payload_buf)
7896        } else {
7897            Bytes::new(__input)
7898        };
7899        let mut __struct = Self::default();
7900        __struct.point_x = buf.get_f32_le();
7901        __struct.point_y = buf.get_f32_le();
7902        __struct.radius = buf.get_f32_le();
7903        __struct.rec_top_x = buf.get_f32_le();
7904        __struct.rec_top_y = buf.get_f32_le();
7905        __struct.rec_bottom_x = buf.get_f32_le();
7906        __struct.rec_bottom_y = buf.get_f32_le();
7907        let tmp = buf.get_u8();
7908        __struct.tracking_status =
7909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7910                enum_type: "CameraTrackingStatusFlags",
7911                value: tmp as u64,
7912            })?;
7913        let tmp = buf.get_u8();
7914        __struct.tracking_mode =
7915            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7916                enum_type: "CameraTrackingMode",
7917                value: tmp as u64,
7918            })?;
7919        let tmp = buf.get_u8();
7920        __struct.target_data =
7921            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
7922                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7923                flag_type: "CameraTrackingTargetData",
7924                value: tmp as u64,
7925            })?;
7926        __struct.camera_device_id = buf.get_u8();
7927        Ok(__struct)
7928    }
7929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7930        let mut __tmp = BytesMut::new(bytes);
7931        #[allow(clippy::absurd_extreme_comparisons)]
7932        #[allow(unused_comparisons)]
7933        if __tmp.remaining() < Self::ENCODED_LEN {
7934            panic!(
7935                "buffer is too small (need {} bytes, but got {})",
7936                Self::ENCODED_LEN,
7937                __tmp.remaining(),
7938            )
7939        }
7940        __tmp.put_f32_le(self.point_x);
7941        __tmp.put_f32_le(self.point_y);
7942        __tmp.put_f32_le(self.radius);
7943        __tmp.put_f32_le(self.rec_top_x);
7944        __tmp.put_f32_le(self.rec_top_y);
7945        __tmp.put_f32_le(self.rec_bottom_x);
7946        __tmp.put_f32_le(self.rec_bottom_y);
7947        __tmp.put_u8(self.tracking_status as u8);
7948        __tmp.put_u8(self.tracking_mode as u8);
7949        __tmp.put_u8(self.target_data.bits() as u8);
7950        if matches!(version, MavlinkVersion::V2) {
7951            __tmp.put_u8(self.camera_device_id);
7952            let len = __tmp.len();
7953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7954        } else {
7955            __tmp.len()
7956        }
7957    }
7958}
7959#[doc = "Camera-IMU triggering and synchronisation message."]
7960#[doc = ""]
7961#[doc = "ID: 112"]
7962#[derive(Debug, Clone, PartialEq)]
7963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7965#[cfg_attr(feature = "ts", derive(TS))]
7966#[cfg_attr(feature = "ts", ts(export))]
7967pub struct CAMERA_TRIGGER_DATA {
7968    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7969    pub time_usec: u64,
7970    #[doc = "Image frame sequence"]
7971    pub seq: u32,
7972}
7973impl CAMERA_TRIGGER_DATA {
7974    pub const ENCODED_LEN: usize = 12usize;
7975    pub const DEFAULT: Self = Self {
7976        time_usec: 0_u64,
7977        seq: 0_u32,
7978    };
7979    #[cfg(feature = "arbitrary")]
7980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7981        use arbitrary::{Arbitrary, Unstructured};
7982        let mut buf = [0u8; 1024];
7983        rng.fill_bytes(&mut buf);
7984        let mut unstructured = Unstructured::new(&buf);
7985        Self::arbitrary(&mut unstructured).unwrap_or_default()
7986    }
7987}
7988impl Default for CAMERA_TRIGGER_DATA {
7989    fn default() -> Self {
7990        Self::DEFAULT.clone()
7991    }
7992}
7993impl MessageData for CAMERA_TRIGGER_DATA {
7994    type Message = MavMessage;
7995    const ID: u32 = 112u32;
7996    const NAME: &'static str = "CAMERA_TRIGGER";
7997    const EXTRA_CRC: u8 = 174u8;
7998    const ENCODED_LEN: usize = 12usize;
7999    fn deser(
8000        _version: MavlinkVersion,
8001        __input: &[u8],
8002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8003        let avail_len = __input.len();
8004        let mut payload_buf = [0; Self::ENCODED_LEN];
8005        let mut buf = if avail_len < Self::ENCODED_LEN {
8006            payload_buf[0..avail_len].copy_from_slice(__input);
8007            Bytes::new(&payload_buf)
8008        } else {
8009            Bytes::new(__input)
8010        };
8011        let mut __struct = Self::default();
8012        __struct.time_usec = buf.get_u64_le();
8013        __struct.seq = buf.get_u32_le();
8014        Ok(__struct)
8015    }
8016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8017        let mut __tmp = BytesMut::new(bytes);
8018        #[allow(clippy::absurd_extreme_comparisons)]
8019        #[allow(unused_comparisons)]
8020        if __tmp.remaining() < Self::ENCODED_LEN {
8021            panic!(
8022                "buffer is too small (need {} bytes, but got {})",
8023                Self::ENCODED_LEN,
8024                __tmp.remaining(),
8025            )
8026        }
8027        __tmp.put_u64_le(self.time_usec);
8028        __tmp.put_u32_le(self.seq);
8029        if matches!(version, MavlinkVersion::V2) {
8030            let len = __tmp.len();
8031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8032        } else {
8033            __tmp.len()
8034        }
8035    }
8036}
8037#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8038#[doc = ""]
8039#[doc = "ID: 387"]
8040#[derive(Debug, Clone, PartialEq)]
8041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8043#[cfg_attr(feature = "ts", derive(TS))]
8044#[cfg_attr(feature = "ts", ts(export))]
8045pub struct CANFD_FRAME_DATA {
8046    #[doc = "Frame ID"]
8047    pub id: u32,
8048    #[doc = "System ID."]
8049    pub target_system: u8,
8050    #[doc = "Component ID."]
8051    pub target_component: u8,
8052    #[doc = "bus number"]
8053    pub bus: u8,
8054    #[doc = "Frame length"]
8055    pub len: u8,
8056    #[doc = "Frame data"]
8057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8059    pub data: [u8; 64],
8060}
8061impl CANFD_FRAME_DATA {
8062    pub const ENCODED_LEN: usize = 72usize;
8063    pub const DEFAULT: Self = Self {
8064        id: 0_u32,
8065        target_system: 0_u8,
8066        target_component: 0_u8,
8067        bus: 0_u8,
8068        len: 0_u8,
8069        data: [0_u8; 64usize],
8070    };
8071    #[cfg(feature = "arbitrary")]
8072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8073        use arbitrary::{Arbitrary, Unstructured};
8074        let mut buf = [0u8; 1024];
8075        rng.fill_bytes(&mut buf);
8076        let mut unstructured = Unstructured::new(&buf);
8077        Self::arbitrary(&mut unstructured).unwrap_or_default()
8078    }
8079}
8080impl Default for CANFD_FRAME_DATA {
8081    fn default() -> Self {
8082        Self::DEFAULT.clone()
8083    }
8084}
8085impl MessageData for CANFD_FRAME_DATA {
8086    type Message = MavMessage;
8087    const ID: u32 = 387u32;
8088    const NAME: &'static str = "CANFD_FRAME";
8089    const EXTRA_CRC: u8 = 4u8;
8090    const ENCODED_LEN: usize = 72usize;
8091    fn deser(
8092        _version: MavlinkVersion,
8093        __input: &[u8],
8094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8095        let avail_len = __input.len();
8096        let mut payload_buf = [0; Self::ENCODED_LEN];
8097        let mut buf = if avail_len < Self::ENCODED_LEN {
8098            payload_buf[0..avail_len].copy_from_slice(__input);
8099            Bytes::new(&payload_buf)
8100        } else {
8101            Bytes::new(__input)
8102        };
8103        let mut __struct = Self::default();
8104        __struct.id = buf.get_u32_le();
8105        __struct.target_system = buf.get_u8();
8106        __struct.target_component = buf.get_u8();
8107        __struct.bus = buf.get_u8();
8108        __struct.len = buf.get_u8();
8109        for v in &mut __struct.data {
8110            let val = buf.get_u8();
8111            *v = val;
8112        }
8113        Ok(__struct)
8114    }
8115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8116        let mut __tmp = BytesMut::new(bytes);
8117        #[allow(clippy::absurd_extreme_comparisons)]
8118        #[allow(unused_comparisons)]
8119        if __tmp.remaining() < Self::ENCODED_LEN {
8120            panic!(
8121                "buffer is too small (need {} bytes, but got {})",
8122                Self::ENCODED_LEN,
8123                __tmp.remaining(),
8124            )
8125        }
8126        __tmp.put_u32_le(self.id);
8127        __tmp.put_u8(self.target_system);
8128        __tmp.put_u8(self.target_component);
8129        __tmp.put_u8(self.bus);
8130        __tmp.put_u8(self.len);
8131        for val in &self.data {
8132            __tmp.put_u8(*val);
8133        }
8134        if matches!(version, MavlinkVersion::V2) {
8135            let len = __tmp.len();
8136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8137        } else {
8138            __tmp.len()
8139        }
8140    }
8141}
8142#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8143#[doc = ""]
8144#[doc = "ID: 388"]
8145#[derive(Debug, Clone, PartialEq)]
8146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8148#[cfg_attr(feature = "ts", derive(TS))]
8149#[cfg_attr(feature = "ts", ts(export))]
8150pub struct CAN_FILTER_MODIFY_DATA {
8151    #[doc = "filter IDs, length num_ids"]
8152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8153    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8154    pub ids: [u16; 16],
8155    #[doc = "System ID."]
8156    pub target_system: u8,
8157    #[doc = "Component ID."]
8158    pub target_component: u8,
8159    #[doc = "bus number"]
8160    pub bus: u8,
8161    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8162    pub operation: CanFilterOp,
8163    #[doc = "number of IDs in filter list"]
8164    pub num_ids: u8,
8165}
8166impl CAN_FILTER_MODIFY_DATA {
8167    pub const ENCODED_LEN: usize = 37usize;
8168    pub const DEFAULT: Self = Self {
8169        ids: [0_u16; 16usize],
8170        target_system: 0_u8,
8171        target_component: 0_u8,
8172        bus: 0_u8,
8173        operation: CanFilterOp::DEFAULT,
8174        num_ids: 0_u8,
8175    };
8176    #[cfg(feature = "arbitrary")]
8177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8178        use arbitrary::{Arbitrary, Unstructured};
8179        let mut buf = [0u8; 1024];
8180        rng.fill_bytes(&mut buf);
8181        let mut unstructured = Unstructured::new(&buf);
8182        Self::arbitrary(&mut unstructured).unwrap_or_default()
8183    }
8184}
8185impl Default for CAN_FILTER_MODIFY_DATA {
8186    fn default() -> Self {
8187        Self::DEFAULT.clone()
8188    }
8189}
8190impl MessageData for CAN_FILTER_MODIFY_DATA {
8191    type Message = MavMessage;
8192    const ID: u32 = 388u32;
8193    const NAME: &'static str = "CAN_FILTER_MODIFY";
8194    const EXTRA_CRC: u8 = 8u8;
8195    const ENCODED_LEN: usize = 37usize;
8196    fn deser(
8197        _version: MavlinkVersion,
8198        __input: &[u8],
8199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8200        let avail_len = __input.len();
8201        let mut payload_buf = [0; Self::ENCODED_LEN];
8202        let mut buf = if avail_len < Self::ENCODED_LEN {
8203            payload_buf[0..avail_len].copy_from_slice(__input);
8204            Bytes::new(&payload_buf)
8205        } else {
8206            Bytes::new(__input)
8207        };
8208        let mut __struct = Self::default();
8209        for v in &mut __struct.ids {
8210            let val = buf.get_u16_le();
8211            *v = val;
8212        }
8213        __struct.target_system = buf.get_u8();
8214        __struct.target_component = buf.get_u8();
8215        __struct.bus = buf.get_u8();
8216        let tmp = buf.get_u8();
8217        __struct.operation =
8218            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8219                enum_type: "CanFilterOp",
8220                value: tmp as u64,
8221            })?;
8222        __struct.num_ids = buf.get_u8();
8223        Ok(__struct)
8224    }
8225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8226        let mut __tmp = BytesMut::new(bytes);
8227        #[allow(clippy::absurd_extreme_comparisons)]
8228        #[allow(unused_comparisons)]
8229        if __tmp.remaining() < Self::ENCODED_LEN {
8230            panic!(
8231                "buffer is too small (need {} bytes, but got {})",
8232                Self::ENCODED_LEN,
8233                __tmp.remaining(),
8234            )
8235        }
8236        for val in &self.ids {
8237            __tmp.put_u16_le(*val);
8238        }
8239        __tmp.put_u8(self.target_system);
8240        __tmp.put_u8(self.target_component);
8241        __tmp.put_u8(self.bus);
8242        __tmp.put_u8(self.operation as u8);
8243        __tmp.put_u8(self.num_ids);
8244        if matches!(version, MavlinkVersion::V2) {
8245            let len = __tmp.len();
8246            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8247        } else {
8248            __tmp.len()
8249        }
8250    }
8251}
8252#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8253#[doc = ""]
8254#[doc = "ID: 386"]
8255#[derive(Debug, Clone, PartialEq)]
8256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8258#[cfg_attr(feature = "ts", derive(TS))]
8259#[cfg_attr(feature = "ts", ts(export))]
8260pub struct CAN_FRAME_DATA {
8261    #[doc = "Frame ID"]
8262    pub id: u32,
8263    #[doc = "System ID."]
8264    pub target_system: u8,
8265    #[doc = "Component ID."]
8266    pub target_component: u8,
8267    #[doc = "Bus number"]
8268    pub bus: u8,
8269    #[doc = "Frame length"]
8270    pub len: u8,
8271    #[doc = "Frame data"]
8272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8273    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8274    pub data: [u8; 8],
8275}
8276impl CAN_FRAME_DATA {
8277    pub const ENCODED_LEN: usize = 16usize;
8278    pub const DEFAULT: Self = Self {
8279        id: 0_u32,
8280        target_system: 0_u8,
8281        target_component: 0_u8,
8282        bus: 0_u8,
8283        len: 0_u8,
8284        data: [0_u8; 8usize],
8285    };
8286    #[cfg(feature = "arbitrary")]
8287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8288        use arbitrary::{Arbitrary, Unstructured};
8289        let mut buf = [0u8; 1024];
8290        rng.fill_bytes(&mut buf);
8291        let mut unstructured = Unstructured::new(&buf);
8292        Self::arbitrary(&mut unstructured).unwrap_or_default()
8293    }
8294}
8295impl Default for CAN_FRAME_DATA {
8296    fn default() -> Self {
8297        Self::DEFAULT.clone()
8298    }
8299}
8300impl MessageData for CAN_FRAME_DATA {
8301    type Message = MavMessage;
8302    const ID: u32 = 386u32;
8303    const NAME: &'static str = "CAN_FRAME";
8304    const EXTRA_CRC: u8 = 132u8;
8305    const ENCODED_LEN: usize = 16usize;
8306    fn deser(
8307        _version: MavlinkVersion,
8308        __input: &[u8],
8309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8310        let avail_len = __input.len();
8311        let mut payload_buf = [0; Self::ENCODED_LEN];
8312        let mut buf = if avail_len < Self::ENCODED_LEN {
8313            payload_buf[0..avail_len].copy_from_slice(__input);
8314            Bytes::new(&payload_buf)
8315        } else {
8316            Bytes::new(__input)
8317        };
8318        let mut __struct = Self::default();
8319        __struct.id = buf.get_u32_le();
8320        __struct.target_system = buf.get_u8();
8321        __struct.target_component = buf.get_u8();
8322        __struct.bus = buf.get_u8();
8323        __struct.len = buf.get_u8();
8324        for v in &mut __struct.data {
8325            let val = buf.get_u8();
8326            *v = val;
8327        }
8328        Ok(__struct)
8329    }
8330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8331        let mut __tmp = BytesMut::new(bytes);
8332        #[allow(clippy::absurd_extreme_comparisons)]
8333        #[allow(unused_comparisons)]
8334        if __tmp.remaining() < Self::ENCODED_LEN {
8335            panic!(
8336                "buffer is too small (need {} bytes, but got {})",
8337                Self::ENCODED_LEN,
8338                __tmp.remaining(),
8339            )
8340        }
8341        __tmp.put_u32_le(self.id);
8342        __tmp.put_u8(self.target_system);
8343        __tmp.put_u8(self.target_component);
8344        __tmp.put_u8(self.bus);
8345        __tmp.put_u8(self.len);
8346        for val in &self.data {
8347            __tmp.put_u8(*val);
8348        }
8349        if matches!(version, MavlinkVersion::V2) {
8350            let len = __tmp.len();
8351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8352        } else {
8353            __tmp.len()
8354        }
8355    }
8356}
8357#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8358#[doc = ""]
8359#[doc = "ID: 336"]
8360#[derive(Debug, Clone, PartialEq)]
8361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8363#[cfg_attr(feature = "ts", derive(TS))]
8364#[cfg_attr(feature = "ts", ts(export))]
8365pub struct CELLULAR_CONFIG_DATA {
8366    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8367    pub enable_lte: u8,
8368    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8369    pub enable_pin: u8,
8370    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8371    #[cfg_attr(feature = "ts", ts(type = "string"))]
8372    pub pin: CharArray<16>,
8373    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8374    #[cfg_attr(feature = "ts", ts(type = "string"))]
8375    pub new_pin: CharArray<16>,
8376    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8377    #[cfg_attr(feature = "ts", ts(type = "string"))]
8378    pub apn: CharArray<32>,
8379    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8380    #[cfg_attr(feature = "ts", ts(type = "string"))]
8381    pub puk: CharArray<16>,
8382    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8383    pub roaming: u8,
8384    #[doc = "Message acceptance response (sent back to GS)."]
8385    pub response: CellularConfigResponse,
8386}
8387impl CELLULAR_CONFIG_DATA {
8388    pub const ENCODED_LEN: usize = 84usize;
8389    pub const DEFAULT: Self = Self {
8390        enable_lte: 0_u8,
8391        enable_pin: 0_u8,
8392        pin: CharArray::new([0_u8; 16usize]),
8393        new_pin: CharArray::new([0_u8; 16usize]),
8394        apn: CharArray::new([0_u8; 32usize]),
8395        puk: CharArray::new([0_u8; 16usize]),
8396        roaming: 0_u8,
8397        response: CellularConfigResponse::DEFAULT,
8398    };
8399    #[cfg(feature = "arbitrary")]
8400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8401        use arbitrary::{Arbitrary, Unstructured};
8402        let mut buf = [0u8; 1024];
8403        rng.fill_bytes(&mut buf);
8404        let mut unstructured = Unstructured::new(&buf);
8405        Self::arbitrary(&mut unstructured).unwrap_or_default()
8406    }
8407}
8408impl Default for CELLULAR_CONFIG_DATA {
8409    fn default() -> Self {
8410        Self::DEFAULT.clone()
8411    }
8412}
8413impl MessageData for CELLULAR_CONFIG_DATA {
8414    type Message = MavMessage;
8415    const ID: u32 = 336u32;
8416    const NAME: &'static str = "CELLULAR_CONFIG";
8417    const EXTRA_CRC: u8 = 245u8;
8418    const ENCODED_LEN: usize = 84usize;
8419    fn deser(
8420        _version: MavlinkVersion,
8421        __input: &[u8],
8422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8423        let avail_len = __input.len();
8424        let mut payload_buf = [0; Self::ENCODED_LEN];
8425        let mut buf = if avail_len < Self::ENCODED_LEN {
8426            payload_buf[0..avail_len].copy_from_slice(__input);
8427            Bytes::new(&payload_buf)
8428        } else {
8429            Bytes::new(__input)
8430        };
8431        let mut __struct = Self::default();
8432        __struct.enable_lte = buf.get_u8();
8433        __struct.enable_pin = buf.get_u8();
8434        let mut tmp = [0_u8; 16usize];
8435        for v in &mut tmp {
8436            *v = buf.get_u8();
8437        }
8438        __struct.pin = CharArray::new(tmp);
8439        let mut tmp = [0_u8; 16usize];
8440        for v in &mut tmp {
8441            *v = buf.get_u8();
8442        }
8443        __struct.new_pin = CharArray::new(tmp);
8444        let mut tmp = [0_u8; 32usize];
8445        for v in &mut tmp {
8446            *v = buf.get_u8();
8447        }
8448        __struct.apn = CharArray::new(tmp);
8449        let mut tmp = [0_u8; 16usize];
8450        for v in &mut tmp {
8451            *v = buf.get_u8();
8452        }
8453        __struct.puk = CharArray::new(tmp);
8454        __struct.roaming = buf.get_u8();
8455        let tmp = buf.get_u8();
8456        __struct.response =
8457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8458                enum_type: "CellularConfigResponse",
8459                value: tmp as u64,
8460            })?;
8461        Ok(__struct)
8462    }
8463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8464        let mut __tmp = BytesMut::new(bytes);
8465        #[allow(clippy::absurd_extreme_comparisons)]
8466        #[allow(unused_comparisons)]
8467        if __tmp.remaining() < Self::ENCODED_LEN {
8468            panic!(
8469                "buffer is too small (need {} bytes, but got {})",
8470                Self::ENCODED_LEN,
8471                __tmp.remaining(),
8472            )
8473        }
8474        __tmp.put_u8(self.enable_lte);
8475        __tmp.put_u8(self.enable_pin);
8476        for val in &self.pin {
8477            __tmp.put_u8(*val);
8478        }
8479        for val in &self.new_pin {
8480            __tmp.put_u8(*val);
8481        }
8482        for val in &self.apn {
8483            __tmp.put_u8(*val);
8484        }
8485        for val in &self.puk {
8486            __tmp.put_u8(*val);
8487        }
8488        __tmp.put_u8(self.roaming);
8489        __tmp.put_u8(self.response as u8);
8490        if matches!(version, MavlinkVersion::V2) {
8491            let len = __tmp.len();
8492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8493        } else {
8494            __tmp.len()
8495        }
8496    }
8497}
8498#[doc = "Report current used cellular network status."]
8499#[doc = ""]
8500#[doc = "ID: 334"]
8501#[derive(Debug, Clone, PartialEq)]
8502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8504#[cfg_attr(feature = "ts", derive(TS))]
8505#[cfg_attr(feature = "ts", ts(export))]
8506pub struct CELLULAR_STATUS_DATA {
8507    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8508    pub mcc: u16,
8509    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8510    pub mnc: u16,
8511    #[doc = "Location area code. If unknown, set to 0"]
8512    pub lac: u16,
8513    #[doc = "Cellular modem status"]
8514    pub status: CellularStatusFlag,
8515    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8516    pub failure_reason: CellularNetworkFailedReason,
8517    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8518    pub mavtype: CellularNetworkRadioType,
8519    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8520    pub quality: u8,
8521}
8522impl CELLULAR_STATUS_DATA {
8523    pub const ENCODED_LEN: usize = 10usize;
8524    pub const DEFAULT: Self = Self {
8525        mcc: 0_u16,
8526        mnc: 0_u16,
8527        lac: 0_u16,
8528        status: CellularStatusFlag::DEFAULT,
8529        failure_reason: CellularNetworkFailedReason::DEFAULT,
8530        mavtype: CellularNetworkRadioType::DEFAULT,
8531        quality: 0_u8,
8532    };
8533    #[cfg(feature = "arbitrary")]
8534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8535        use arbitrary::{Arbitrary, Unstructured};
8536        let mut buf = [0u8; 1024];
8537        rng.fill_bytes(&mut buf);
8538        let mut unstructured = Unstructured::new(&buf);
8539        Self::arbitrary(&mut unstructured).unwrap_or_default()
8540    }
8541}
8542impl Default for CELLULAR_STATUS_DATA {
8543    fn default() -> Self {
8544        Self::DEFAULT.clone()
8545    }
8546}
8547impl MessageData for CELLULAR_STATUS_DATA {
8548    type Message = MavMessage;
8549    const ID: u32 = 334u32;
8550    const NAME: &'static str = "CELLULAR_STATUS";
8551    const EXTRA_CRC: u8 = 72u8;
8552    const ENCODED_LEN: usize = 10usize;
8553    fn deser(
8554        _version: MavlinkVersion,
8555        __input: &[u8],
8556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8557        let avail_len = __input.len();
8558        let mut payload_buf = [0; Self::ENCODED_LEN];
8559        let mut buf = if avail_len < Self::ENCODED_LEN {
8560            payload_buf[0..avail_len].copy_from_slice(__input);
8561            Bytes::new(&payload_buf)
8562        } else {
8563            Bytes::new(__input)
8564        };
8565        let mut __struct = Self::default();
8566        __struct.mcc = buf.get_u16_le();
8567        __struct.mnc = buf.get_u16_le();
8568        __struct.lac = buf.get_u16_le();
8569        let tmp = buf.get_u8();
8570        __struct.status =
8571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8572                enum_type: "CellularStatusFlag",
8573                value: tmp as u64,
8574            })?;
8575        let tmp = buf.get_u8();
8576        __struct.failure_reason =
8577            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8578                enum_type: "CellularNetworkFailedReason",
8579                value: tmp as u64,
8580            })?;
8581        let tmp = buf.get_u8();
8582        __struct.mavtype =
8583            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8584                enum_type: "CellularNetworkRadioType",
8585                value: tmp as u64,
8586            })?;
8587        __struct.quality = buf.get_u8();
8588        Ok(__struct)
8589    }
8590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8591        let mut __tmp = BytesMut::new(bytes);
8592        #[allow(clippy::absurd_extreme_comparisons)]
8593        #[allow(unused_comparisons)]
8594        if __tmp.remaining() < Self::ENCODED_LEN {
8595            panic!(
8596                "buffer is too small (need {} bytes, but got {})",
8597                Self::ENCODED_LEN,
8598                __tmp.remaining(),
8599            )
8600        }
8601        __tmp.put_u16_le(self.mcc);
8602        __tmp.put_u16_le(self.mnc);
8603        __tmp.put_u16_le(self.lac);
8604        __tmp.put_u8(self.status as u8);
8605        __tmp.put_u8(self.failure_reason as u8);
8606        __tmp.put_u8(self.mavtype as u8);
8607        __tmp.put_u8(self.quality);
8608        if matches!(version, MavlinkVersion::V2) {
8609            let len = __tmp.len();
8610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8611        } else {
8612            __tmp.len()
8613        }
8614    }
8615}
8616#[doc = "Request to control this MAV."]
8617#[doc = ""]
8618#[doc = "ID: 5"]
8619#[derive(Debug, Clone, PartialEq)]
8620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8622#[cfg_attr(feature = "ts", derive(TS))]
8623#[cfg_attr(feature = "ts", ts(export))]
8624pub struct CHANGE_OPERATOR_CONTROL_DATA {
8625    #[doc = "System the GCS requests control for"]
8626    pub target_system: u8,
8627    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8628    pub control_request: u8,
8629    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8630    pub version: u8,
8631    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8632    #[cfg_attr(feature = "ts", ts(type = "string"))]
8633    pub passkey: CharArray<25>,
8634}
8635impl CHANGE_OPERATOR_CONTROL_DATA {
8636    pub const ENCODED_LEN: usize = 28usize;
8637    pub const DEFAULT: Self = Self {
8638        target_system: 0_u8,
8639        control_request: 0_u8,
8640        version: 0_u8,
8641        passkey: CharArray::new([0_u8; 25usize]),
8642    };
8643    #[cfg(feature = "arbitrary")]
8644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8645        use arbitrary::{Arbitrary, Unstructured};
8646        let mut buf = [0u8; 1024];
8647        rng.fill_bytes(&mut buf);
8648        let mut unstructured = Unstructured::new(&buf);
8649        Self::arbitrary(&mut unstructured).unwrap_or_default()
8650    }
8651}
8652impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8653    fn default() -> Self {
8654        Self::DEFAULT.clone()
8655    }
8656}
8657impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8658    type Message = MavMessage;
8659    const ID: u32 = 5u32;
8660    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8661    const EXTRA_CRC: u8 = 217u8;
8662    const ENCODED_LEN: usize = 28usize;
8663    fn deser(
8664        _version: MavlinkVersion,
8665        __input: &[u8],
8666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8667        let avail_len = __input.len();
8668        let mut payload_buf = [0; Self::ENCODED_LEN];
8669        let mut buf = if avail_len < Self::ENCODED_LEN {
8670            payload_buf[0..avail_len].copy_from_slice(__input);
8671            Bytes::new(&payload_buf)
8672        } else {
8673            Bytes::new(__input)
8674        };
8675        let mut __struct = Self::default();
8676        __struct.target_system = buf.get_u8();
8677        __struct.control_request = buf.get_u8();
8678        __struct.version = buf.get_u8();
8679        let mut tmp = [0_u8; 25usize];
8680        for v in &mut tmp {
8681            *v = buf.get_u8();
8682        }
8683        __struct.passkey = CharArray::new(tmp);
8684        Ok(__struct)
8685    }
8686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8687        let mut __tmp = BytesMut::new(bytes);
8688        #[allow(clippy::absurd_extreme_comparisons)]
8689        #[allow(unused_comparisons)]
8690        if __tmp.remaining() < Self::ENCODED_LEN {
8691            panic!(
8692                "buffer is too small (need {} bytes, but got {})",
8693                Self::ENCODED_LEN,
8694                __tmp.remaining(),
8695            )
8696        }
8697        __tmp.put_u8(self.target_system);
8698        __tmp.put_u8(self.control_request);
8699        __tmp.put_u8(self.version);
8700        for val in &self.passkey {
8701            __tmp.put_u8(*val);
8702        }
8703        if matches!(version, MavlinkVersion::V2) {
8704            let len = __tmp.len();
8705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8706        } else {
8707            __tmp.len()
8708        }
8709    }
8710}
8711#[doc = "Accept / deny control of this MAV."]
8712#[doc = ""]
8713#[doc = "ID: 6"]
8714#[derive(Debug, Clone, PartialEq)]
8715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8717#[cfg_attr(feature = "ts", derive(TS))]
8718#[cfg_attr(feature = "ts", ts(export))]
8719pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8720    #[doc = "ID of the GCS this message"]
8721    pub gcs_system_id: u8,
8722    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8723    pub control_request: u8,
8724    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8725    pub ack: u8,
8726}
8727impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8728    pub const ENCODED_LEN: usize = 3usize;
8729    pub const DEFAULT: Self = Self {
8730        gcs_system_id: 0_u8,
8731        control_request: 0_u8,
8732        ack: 0_u8,
8733    };
8734    #[cfg(feature = "arbitrary")]
8735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8736        use arbitrary::{Arbitrary, Unstructured};
8737        let mut buf = [0u8; 1024];
8738        rng.fill_bytes(&mut buf);
8739        let mut unstructured = Unstructured::new(&buf);
8740        Self::arbitrary(&mut unstructured).unwrap_or_default()
8741    }
8742}
8743impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8744    fn default() -> Self {
8745        Self::DEFAULT.clone()
8746    }
8747}
8748impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8749    type Message = MavMessage;
8750    const ID: u32 = 6u32;
8751    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8752    const EXTRA_CRC: u8 = 104u8;
8753    const ENCODED_LEN: usize = 3usize;
8754    fn deser(
8755        _version: MavlinkVersion,
8756        __input: &[u8],
8757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8758        let avail_len = __input.len();
8759        let mut payload_buf = [0; Self::ENCODED_LEN];
8760        let mut buf = if avail_len < Self::ENCODED_LEN {
8761            payload_buf[0..avail_len].copy_from_slice(__input);
8762            Bytes::new(&payload_buf)
8763        } else {
8764            Bytes::new(__input)
8765        };
8766        let mut __struct = Self::default();
8767        __struct.gcs_system_id = buf.get_u8();
8768        __struct.control_request = buf.get_u8();
8769        __struct.ack = buf.get_u8();
8770        Ok(__struct)
8771    }
8772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8773        let mut __tmp = BytesMut::new(bytes);
8774        #[allow(clippy::absurd_extreme_comparisons)]
8775        #[allow(unused_comparisons)]
8776        if __tmp.remaining() < Self::ENCODED_LEN {
8777            panic!(
8778                "buffer is too small (need {} bytes, but got {})",
8779                Self::ENCODED_LEN,
8780                __tmp.remaining(),
8781            )
8782        }
8783        __tmp.put_u8(self.gcs_system_id);
8784        __tmp.put_u8(self.control_request);
8785        __tmp.put_u8(self.ack);
8786        if matches!(version, MavlinkVersion::V2) {
8787            let len = __tmp.len();
8788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8789        } else {
8790            __tmp.len()
8791        }
8792    }
8793}
8794#[doc = "Information about a potential collision."]
8795#[doc = ""]
8796#[doc = "ID: 247"]
8797#[derive(Debug, Clone, PartialEq)]
8798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8800#[cfg_attr(feature = "ts", derive(TS))]
8801#[cfg_attr(feature = "ts", ts(export))]
8802pub struct COLLISION_DATA {
8803    #[doc = "Unique identifier, domain based on src field"]
8804    pub id: u32,
8805    #[doc = "Estimated time until collision occurs"]
8806    pub time_to_minimum_delta: f32,
8807    #[doc = "Closest vertical distance between vehicle and object"]
8808    pub altitude_minimum_delta: f32,
8809    #[doc = "Closest horizontal distance between vehicle and object"]
8810    pub horizontal_minimum_delta: f32,
8811    #[doc = "Collision data source"]
8812    pub src: MavCollisionSrc,
8813    #[doc = "Action that is being taken to avoid this collision"]
8814    pub action: MavCollisionAction,
8815    #[doc = "How concerned the aircraft is about this collision"]
8816    pub threat_level: MavCollisionThreatLevel,
8817}
8818impl COLLISION_DATA {
8819    pub const ENCODED_LEN: usize = 19usize;
8820    pub const DEFAULT: Self = Self {
8821        id: 0_u32,
8822        time_to_minimum_delta: 0.0_f32,
8823        altitude_minimum_delta: 0.0_f32,
8824        horizontal_minimum_delta: 0.0_f32,
8825        src: MavCollisionSrc::DEFAULT,
8826        action: MavCollisionAction::DEFAULT,
8827        threat_level: MavCollisionThreatLevel::DEFAULT,
8828    };
8829    #[cfg(feature = "arbitrary")]
8830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8831        use arbitrary::{Arbitrary, Unstructured};
8832        let mut buf = [0u8; 1024];
8833        rng.fill_bytes(&mut buf);
8834        let mut unstructured = Unstructured::new(&buf);
8835        Self::arbitrary(&mut unstructured).unwrap_or_default()
8836    }
8837}
8838impl Default for COLLISION_DATA {
8839    fn default() -> Self {
8840        Self::DEFAULT.clone()
8841    }
8842}
8843impl MessageData for COLLISION_DATA {
8844    type Message = MavMessage;
8845    const ID: u32 = 247u32;
8846    const NAME: &'static str = "COLLISION";
8847    const EXTRA_CRC: u8 = 81u8;
8848    const ENCODED_LEN: usize = 19usize;
8849    fn deser(
8850        _version: MavlinkVersion,
8851        __input: &[u8],
8852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8853        let avail_len = __input.len();
8854        let mut payload_buf = [0; Self::ENCODED_LEN];
8855        let mut buf = if avail_len < Self::ENCODED_LEN {
8856            payload_buf[0..avail_len].copy_from_slice(__input);
8857            Bytes::new(&payload_buf)
8858        } else {
8859            Bytes::new(__input)
8860        };
8861        let mut __struct = Self::default();
8862        __struct.id = buf.get_u32_le();
8863        __struct.time_to_minimum_delta = buf.get_f32_le();
8864        __struct.altitude_minimum_delta = buf.get_f32_le();
8865        __struct.horizontal_minimum_delta = buf.get_f32_le();
8866        let tmp = buf.get_u8();
8867        __struct.src =
8868            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8869                enum_type: "MavCollisionSrc",
8870                value: tmp as u64,
8871            })?;
8872        let tmp = buf.get_u8();
8873        __struct.action =
8874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8875                enum_type: "MavCollisionAction",
8876                value: tmp as u64,
8877            })?;
8878        let tmp = buf.get_u8();
8879        __struct.threat_level =
8880            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8881                enum_type: "MavCollisionThreatLevel",
8882                value: tmp as u64,
8883            })?;
8884        Ok(__struct)
8885    }
8886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8887        let mut __tmp = BytesMut::new(bytes);
8888        #[allow(clippy::absurd_extreme_comparisons)]
8889        #[allow(unused_comparisons)]
8890        if __tmp.remaining() < Self::ENCODED_LEN {
8891            panic!(
8892                "buffer is too small (need {} bytes, but got {})",
8893                Self::ENCODED_LEN,
8894                __tmp.remaining(),
8895            )
8896        }
8897        __tmp.put_u32_le(self.id);
8898        __tmp.put_f32_le(self.time_to_minimum_delta);
8899        __tmp.put_f32_le(self.altitude_minimum_delta);
8900        __tmp.put_f32_le(self.horizontal_minimum_delta);
8901        __tmp.put_u8(self.src as u8);
8902        __tmp.put_u8(self.action as u8);
8903        __tmp.put_u8(self.threat_level as u8);
8904        if matches!(version, MavlinkVersion::V2) {
8905            let len = __tmp.len();
8906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8907        } else {
8908            __tmp.len()
8909        }
8910    }
8911}
8912#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8913#[doc = ""]
8914#[doc = "ID: 77"]
8915#[derive(Debug, Clone, PartialEq)]
8916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8918#[cfg_attr(feature = "ts", derive(TS))]
8919#[cfg_attr(feature = "ts", ts(export))]
8920pub struct COMMAND_ACK_DATA {
8921    #[doc = "Command ID (of acknowledged command)."]
8922    pub command: MavCmd,
8923    #[doc = "Result of command."]
8924    pub result: MavResult,
8925    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8927    pub progress: u8,
8928    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8930    pub result_param2: i32,
8931    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8933    pub target_system: u8,
8934    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8936    pub target_component: u8,
8937}
8938impl COMMAND_ACK_DATA {
8939    pub const ENCODED_LEN: usize = 10usize;
8940    pub const DEFAULT: Self = Self {
8941        command: MavCmd::DEFAULT,
8942        result: MavResult::DEFAULT,
8943        progress: 0_u8,
8944        result_param2: 0_i32,
8945        target_system: 0_u8,
8946        target_component: 0_u8,
8947    };
8948    #[cfg(feature = "arbitrary")]
8949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8950        use arbitrary::{Arbitrary, Unstructured};
8951        let mut buf = [0u8; 1024];
8952        rng.fill_bytes(&mut buf);
8953        let mut unstructured = Unstructured::new(&buf);
8954        Self::arbitrary(&mut unstructured).unwrap_or_default()
8955    }
8956}
8957impl Default for COMMAND_ACK_DATA {
8958    fn default() -> Self {
8959        Self::DEFAULT.clone()
8960    }
8961}
8962impl MessageData for COMMAND_ACK_DATA {
8963    type Message = MavMessage;
8964    const ID: u32 = 77u32;
8965    const NAME: &'static str = "COMMAND_ACK";
8966    const EXTRA_CRC: u8 = 143u8;
8967    const ENCODED_LEN: usize = 10usize;
8968    fn deser(
8969        _version: MavlinkVersion,
8970        __input: &[u8],
8971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8972        let avail_len = __input.len();
8973        let mut payload_buf = [0; Self::ENCODED_LEN];
8974        let mut buf = if avail_len < Self::ENCODED_LEN {
8975            payload_buf[0..avail_len].copy_from_slice(__input);
8976            Bytes::new(&payload_buf)
8977        } else {
8978            Bytes::new(__input)
8979        };
8980        let mut __struct = Self::default();
8981        let tmp = buf.get_u16_le();
8982        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8983            ::mavlink_core::error::ParserError::InvalidEnum {
8984                enum_type: "MavCmd",
8985                value: tmp as u64,
8986            },
8987        )?;
8988        let tmp = buf.get_u8();
8989        __struct.result =
8990            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8991                enum_type: "MavResult",
8992                value: tmp as u64,
8993            })?;
8994        __struct.progress = buf.get_u8();
8995        __struct.result_param2 = buf.get_i32_le();
8996        __struct.target_system = buf.get_u8();
8997        __struct.target_component = buf.get_u8();
8998        Ok(__struct)
8999    }
9000    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9001        let mut __tmp = BytesMut::new(bytes);
9002        #[allow(clippy::absurd_extreme_comparisons)]
9003        #[allow(unused_comparisons)]
9004        if __tmp.remaining() < Self::ENCODED_LEN {
9005            panic!(
9006                "buffer is too small (need {} bytes, but got {})",
9007                Self::ENCODED_LEN,
9008                __tmp.remaining(),
9009            )
9010        }
9011        __tmp.put_u16_le(self.command as u16);
9012        __tmp.put_u8(self.result as u8);
9013        if matches!(version, MavlinkVersion::V2) {
9014            __tmp.put_u8(self.progress);
9015            __tmp.put_i32_le(self.result_param2);
9016            __tmp.put_u8(self.target_system);
9017            __tmp.put_u8(self.target_component);
9018            let len = __tmp.len();
9019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9020        } else {
9021            __tmp.len()
9022        }
9023    }
9024}
9025#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9026#[doc = ""]
9027#[doc = "ID: 80"]
9028#[derive(Debug, Clone, PartialEq)]
9029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9031#[cfg_attr(feature = "ts", derive(TS))]
9032#[cfg_attr(feature = "ts", ts(export))]
9033pub struct COMMAND_CANCEL_DATA {
9034    #[doc = "Command ID (of command to cancel)."]
9035    pub command: MavCmd,
9036    #[doc = "System executing long running command. Should not be broadcast (0)."]
9037    pub target_system: u8,
9038    #[doc = "Component executing long running command."]
9039    pub target_component: u8,
9040}
9041impl COMMAND_CANCEL_DATA {
9042    pub const ENCODED_LEN: usize = 4usize;
9043    pub const DEFAULT: Self = Self {
9044        command: MavCmd::DEFAULT,
9045        target_system: 0_u8,
9046        target_component: 0_u8,
9047    };
9048    #[cfg(feature = "arbitrary")]
9049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9050        use arbitrary::{Arbitrary, Unstructured};
9051        let mut buf = [0u8; 1024];
9052        rng.fill_bytes(&mut buf);
9053        let mut unstructured = Unstructured::new(&buf);
9054        Self::arbitrary(&mut unstructured).unwrap_or_default()
9055    }
9056}
9057impl Default for COMMAND_CANCEL_DATA {
9058    fn default() -> Self {
9059        Self::DEFAULT.clone()
9060    }
9061}
9062impl MessageData for COMMAND_CANCEL_DATA {
9063    type Message = MavMessage;
9064    const ID: u32 = 80u32;
9065    const NAME: &'static str = "COMMAND_CANCEL";
9066    const EXTRA_CRC: u8 = 14u8;
9067    const ENCODED_LEN: usize = 4usize;
9068    fn deser(
9069        _version: MavlinkVersion,
9070        __input: &[u8],
9071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9072        let avail_len = __input.len();
9073        let mut payload_buf = [0; Self::ENCODED_LEN];
9074        let mut buf = if avail_len < Self::ENCODED_LEN {
9075            payload_buf[0..avail_len].copy_from_slice(__input);
9076            Bytes::new(&payload_buf)
9077        } else {
9078            Bytes::new(__input)
9079        };
9080        let mut __struct = Self::default();
9081        let tmp = buf.get_u16_le();
9082        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9083            ::mavlink_core::error::ParserError::InvalidEnum {
9084                enum_type: "MavCmd",
9085                value: tmp as u64,
9086            },
9087        )?;
9088        __struct.target_system = buf.get_u8();
9089        __struct.target_component = buf.get_u8();
9090        Ok(__struct)
9091    }
9092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9093        let mut __tmp = BytesMut::new(bytes);
9094        #[allow(clippy::absurd_extreme_comparisons)]
9095        #[allow(unused_comparisons)]
9096        if __tmp.remaining() < Self::ENCODED_LEN {
9097            panic!(
9098                "buffer is too small (need {} bytes, but got {})",
9099                Self::ENCODED_LEN,
9100                __tmp.remaining(),
9101            )
9102        }
9103        __tmp.put_u16_le(self.command as u16);
9104        __tmp.put_u8(self.target_system);
9105        __tmp.put_u8(self.target_component);
9106        if matches!(version, MavlinkVersion::V2) {
9107            let len = __tmp.len();
9108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9109        } else {
9110            __tmp.len()
9111        }
9112    }
9113}
9114#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9115#[doc = ""]
9116#[doc = "ID: 75"]
9117#[derive(Debug, Clone, PartialEq)]
9118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9120#[cfg_attr(feature = "ts", derive(TS))]
9121#[cfg_attr(feature = "ts", ts(export))]
9122pub struct COMMAND_INT_DATA {
9123    #[doc = "PARAM1, see MAV_CMD enum"]
9124    pub param1: f32,
9125    #[doc = "PARAM2, see MAV_CMD enum"]
9126    pub param2: f32,
9127    #[doc = "PARAM3, see MAV_CMD enum"]
9128    pub param3: f32,
9129    #[doc = "PARAM4, see MAV_CMD enum"]
9130    pub param4: f32,
9131    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9132    pub x: i32,
9133    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9134    pub y: i32,
9135    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9136    pub z: f32,
9137    #[doc = "The scheduled action for the mission item."]
9138    pub command: MavCmd,
9139    #[doc = "System ID"]
9140    pub target_system: u8,
9141    #[doc = "Component ID"]
9142    pub target_component: u8,
9143    #[doc = "The coordinate system of the COMMAND."]
9144    pub frame: MavFrame,
9145    #[doc = "Not used."]
9146    pub current: u8,
9147    #[doc = "Not used (set 0)."]
9148    pub autocontinue: u8,
9149}
9150impl COMMAND_INT_DATA {
9151    pub const ENCODED_LEN: usize = 35usize;
9152    pub const DEFAULT: Self = Self {
9153        param1: 0.0_f32,
9154        param2: 0.0_f32,
9155        param3: 0.0_f32,
9156        param4: 0.0_f32,
9157        x: 0_i32,
9158        y: 0_i32,
9159        z: 0.0_f32,
9160        command: MavCmd::DEFAULT,
9161        target_system: 0_u8,
9162        target_component: 0_u8,
9163        frame: MavFrame::DEFAULT,
9164        current: 0_u8,
9165        autocontinue: 0_u8,
9166    };
9167    #[cfg(feature = "arbitrary")]
9168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9169        use arbitrary::{Arbitrary, Unstructured};
9170        let mut buf = [0u8; 1024];
9171        rng.fill_bytes(&mut buf);
9172        let mut unstructured = Unstructured::new(&buf);
9173        Self::arbitrary(&mut unstructured).unwrap_or_default()
9174    }
9175}
9176impl Default for COMMAND_INT_DATA {
9177    fn default() -> Self {
9178        Self::DEFAULT.clone()
9179    }
9180}
9181impl MessageData for COMMAND_INT_DATA {
9182    type Message = MavMessage;
9183    const ID: u32 = 75u32;
9184    const NAME: &'static str = "COMMAND_INT";
9185    const EXTRA_CRC: u8 = 158u8;
9186    const ENCODED_LEN: usize = 35usize;
9187    fn deser(
9188        _version: MavlinkVersion,
9189        __input: &[u8],
9190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9191        let avail_len = __input.len();
9192        let mut payload_buf = [0; Self::ENCODED_LEN];
9193        let mut buf = if avail_len < Self::ENCODED_LEN {
9194            payload_buf[0..avail_len].copy_from_slice(__input);
9195            Bytes::new(&payload_buf)
9196        } else {
9197            Bytes::new(__input)
9198        };
9199        let mut __struct = Self::default();
9200        __struct.param1 = buf.get_f32_le();
9201        __struct.param2 = buf.get_f32_le();
9202        __struct.param3 = buf.get_f32_le();
9203        __struct.param4 = buf.get_f32_le();
9204        __struct.x = buf.get_i32_le();
9205        __struct.y = buf.get_i32_le();
9206        __struct.z = buf.get_f32_le();
9207        let tmp = buf.get_u16_le();
9208        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9209            ::mavlink_core::error::ParserError::InvalidEnum {
9210                enum_type: "MavCmd",
9211                value: tmp as u64,
9212            },
9213        )?;
9214        __struct.target_system = buf.get_u8();
9215        __struct.target_component = buf.get_u8();
9216        let tmp = buf.get_u8();
9217        __struct.frame =
9218            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9219                enum_type: "MavFrame",
9220                value: tmp as u64,
9221            })?;
9222        __struct.current = buf.get_u8();
9223        __struct.autocontinue = buf.get_u8();
9224        Ok(__struct)
9225    }
9226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9227        let mut __tmp = BytesMut::new(bytes);
9228        #[allow(clippy::absurd_extreme_comparisons)]
9229        #[allow(unused_comparisons)]
9230        if __tmp.remaining() < Self::ENCODED_LEN {
9231            panic!(
9232                "buffer is too small (need {} bytes, but got {})",
9233                Self::ENCODED_LEN,
9234                __tmp.remaining(),
9235            )
9236        }
9237        __tmp.put_f32_le(self.param1);
9238        __tmp.put_f32_le(self.param2);
9239        __tmp.put_f32_le(self.param3);
9240        __tmp.put_f32_le(self.param4);
9241        __tmp.put_i32_le(self.x);
9242        __tmp.put_i32_le(self.y);
9243        __tmp.put_f32_le(self.z);
9244        __tmp.put_u16_le(self.command as u16);
9245        __tmp.put_u8(self.target_system);
9246        __tmp.put_u8(self.target_component);
9247        __tmp.put_u8(self.frame as u8);
9248        __tmp.put_u8(self.current);
9249        __tmp.put_u8(self.autocontinue);
9250        if matches!(version, MavlinkVersion::V2) {
9251            let len = __tmp.len();
9252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9253        } else {
9254            __tmp.len()
9255        }
9256    }
9257}
9258#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9259#[doc = ""]
9260#[doc = "ID: 76"]
9261#[derive(Debug, Clone, PartialEq)]
9262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9264#[cfg_attr(feature = "ts", derive(TS))]
9265#[cfg_attr(feature = "ts", ts(export))]
9266pub struct COMMAND_LONG_DATA {
9267    #[doc = "Parameter 1 (for the specific command)."]
9268    pub param1: f32,
9269    #[doc = "Parameter 2 (for the specific command)."]
9270    pub param2: f32,
9271    #[doc = "Parameter 3 (for the specific command)."]
9272    pub param3: f32,
9273    #[doc = "Parameter 4 (for the specific command)."]
9274    pub param4: f32,
9275    #[doc = "Parameter 5 (for the specific command)."]
9276    pub param5: f32,
9277    #[doc = "Parameter 6 (for the specific command)."]
9278    pub param6: f32,
9279    #[doc = "Parameter 7 (for the specific command)."]
9280    pub param7: f32,
9281    #[doc = "Command ID (of command to send)."]
9282    pub command: MavCmd,
9283    #[doc = "System which should execute the command"]
9284    pub target_system: u8,
9285    #[doc = "Component which should execute the command, 0 for all components"]
9286    pub target_component: u8,
9287    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9288    pub confirmation: u8,
9289}
9290impl COMMAND_LONG_DATA {
9291    pub const ENCODED_LEN: usize = 33usize;
9292    pub const DEFAULT: Self = Self {
9293        param1: 0.0_f32,
9294        param2: 0.0_f32,
9295        param3: 0.0_f32,
9296        param4: 0.0_f32,
9297        param5: 0.0_f32,
9298        param6: 0.0_f32,
9299        param7: 0.0_f32,
9300        command: MavCmd::DEFAULT,
9301        target_system: 0_u8,
9302        target_component: 0_u8,
9303        confirmation: 0_u8,
9304    };
9305    #[cfg(feature = "arbitrary")]
9306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9307        use arbitrary::{Arbitrary, Unstructured};
9308        let mut buf = [0u8; 1024];
9309        rng.fill_bytes(&mut buf);
9310        let mut unstructured = Unstructured::new(&buf);
9311        Self::arbitrary(&mut unstructured).unwrap_or_default()
9312    }
9313}
9314impl Default for COMMAND_LONG_DATA {
9315    fn default() -> Self {
9316        Self::DEFAULT.clone()
9317    }
9318}
9319impl MessageData for COMMAND_LONG_DATA {
9320    type Message = MavMessage;
9321    const ID: u32 = 76u32;
9322    const NAME: &'static str = "COMMAND_LONG";
9323    const EXTRA_CRC: u8 = 152u8;
9324    const ENCODED_LEN: usize = 33usize;
9325    fn deser(
9326        _version: MavlinkVersion,
9327        __input: &[u8],
9328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9329        let avail_len = __input.len();
9330        let mut payload_buf = [0; Self::ENCODED_LEN];
9331        let mut buf = if avail_len < Self::ENCODED_LEN {
9332            payload_buf[0..avail_len].copy_from_slice(__input);
9333            Bytes::new(&payload_buf)
9334        } else {
9335            Bytes::new(__input)
9336        };
9337        let mut __struct = Self::default();
9338        __struct.param1 = buf.get_f32_le();
9339        __struct.param2 = buf.get_f32_le();
9340        __struct.param3 = buf.get_f32_le();
9341        __struct.param4 = buf.get_f32_le();
9342        __struct.param5 = buf.get_f32_le();
9343        __struct.param6 = buf.get_f32_le();
9344        __struct.param7 = buf.get_f32_le();
9345        let tmp = buf.get_u16_le();
9346        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9347            ::mavlink_core::error::ParserError::InvalidEnum {
9348                enum_type: "MavCmd",
9349                value: tmp as u64,
9350            },
9351        )?;
9352        __struct.target_system = buf.get_u8();
9353        __struct.target_component = buf.get_u8();
9354        __struct.confirmation = buf.get_u8();
9355        Ok(__struct)
9356    }
9357    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9358        let mut __tmp = BytesMut::new(bytes);
9359        #[allow(clippy::absurd_extreme_comparisons)]
9360        #[allow(unused_comparisons)]
9361        if __tmp.remaining() < Self::ENCODED_LEN {
9362            panic!(
9363                "buffer is too small (need {} bytes, but got {})",
9364                Self::ENCODED_LEN,
9365                __tmp.remaining(),
9366            )
9367        }
9368        __tmp.put_f32_le(self.param1);
9369        __tmp.put_f32_le(self.param2);
9370        __tmp.put_f32_le(self.param3);
9371        __tmp.put_f32_le(self.param4);
9372        __tmp.put_f32_le(self.param5);
9373        __tmp.put_f32_le(self.param6);
9374        __tmp.put_f32_le(self.param7);
9375        __tmp.put_u16_le(self.command as u16);
9376        __tmp.put_u8(self.target_system);
9377        __tmp.put_u8(self.target_component);
9378        __tmp.put_u8(self.confirmation);
9379        if matches!(version, MavlinkVersion::V2) {
9380            let len = __tmp.len();
9381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9382        } else {
9383            __tmp.len()
9384        }
9385    }
9386}
9387#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9388#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9389#[doc = ""]
9390#[doc = "ID: 395"]
9391#[derive(Debug, Clone, PartialEq)]
9392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9394#[cfg_attr(feature = "ts", derive(TS))]
9395#[cfg_attr(feature = "ts", ts(export))]
9396pub struct COMPONENT_INFORMATION_DATA {
9397    #[doc = "Timestamp (time since system boot)."]
9398    pub time_boot_ms: u32,
9399    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9400    pub general_metadata_file_crc: u32,
9401    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9402    pub peripherals_metadata_file_crc: u32,
9403    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9404    #[cfg_attr(feature = "ts", ts(type = "string"))]
9405    pub general_metadata_uri: CharArray<100>,
9406    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9407    #[cfg_attr(feature = "ts", ts(type = "string"))]
9408    pub peripherals_metadata_uri: CharArray<100>,
9409}
9410impl COMPONENT_INFORMATION_DATA {
9411    pub const ENCODED_LEN: usize = 212usize;
9412    pub const DEFAULT: Self = Self {
9413        time_boot_ms: 0_u32,
9414        general_metadata_file_crc: 0_u32,
9415        peripherals_metadata_file_crc: 0_u32,
9416        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9417        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9418    };
9419    #[cfg(feature = "arbitrary")]
9420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9421        use arbitrary::{Arbitrary, Unstructured};
9422        let mut buf = [0u8; 1024];
9423        rng.fill_bytes(&mut buf);
9424        let mut unstructured = Unstructured::new(&buf);
9425        Self::arbitrary(&mut unstructured).unwrap_or_default()
9426    }
9427}
9428impl Default for COMPONENT_INFORMATION_DATA {
9429    fn default() -> Self {
9430        Self::DEFAULT.clone()
9431    }
9432}
9433impl MessageData for COMPONENT_INFORMATION_DATA {
9434    type Message = MavMessage;
9435    const ID: u32 = 395u32;
9436    const NAME: &'static str = "COMPONENT_INFORMATION";
9437    const EXTRA_CRC: u8 = 0u8;
9438    const ENCODED_LEN: usize = 212usize;
9439    fn deser(
9440        _version: MavlinkVersion,
9441        __input: &[u8],
9442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9443        let avail_len = __input.len();
9444        let mut payload_buf = [0; Self::ENCODED_LEN];
9445        let mut buf = if avail_len < Self::ENCODED_LEN {
9446            payload_buf[0..avail_len].copy_from_slice(__input);
9447            Bytes::new(&payload_buf)
9448        } else {
9449            Bytes::new(__input)
9450        };
9451        let mut __struct = Self::default();
9452        __struct.time_boot_ms = buf.get_u32_le();
9453        __struct.general_metadata_file_crc = buf.get_u32_le();
9454        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9455        let mut tmp = [0_u8; 100usize];
9456        for v in &mut tmp {
9457            *v = buf.get_u8();
9458        }
9459        __struct.general_metadata_uri = CharArray::new(tmp);
9460        let mut tmp = [0_u8; 100usize];
9461        for v in &mut tmp {
9462            *v = buf.get_u8();
9463        }
9464        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9465        Ok(__struct)
9466    }
9467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9468        let mut __tmp = BytesMut::new(bytes);
9469        #[allow(clippy::absurd_extreme_comparisons)]
9470        #[allow(unused_comparisons)]
9471        if __tmp.remaining() < Self::ENCODED_LEN {
9472            panic!(
9473                "buffer is too small (need {} bytes, but got {})",
9474                Self::ENCODED_LEN,
9475                __tmp.remaining(),
9476            )
9477        }
9478        __tmp.put_u32_le(self.time_boot_ms);
9479        __tmp.put_u32_le(self.general_metadata_file_crc);
9480        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9481        for val in &self.general_metadata_uri {
9482            __tmp.put_u8(*val);
9483        }
9484        for val in &self.peripherals_metadata_uri {
9485            __tmp.put_u8(*val);
9486        }
9487        if matches!(version, MavlinkVersion::V2) {
9488            let len = __tmp.len();
9489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9490        } else {
9491            __tmp.len()
9492        }
9493    }
9494}
9495#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9496#[doc = ""]
9497#[doc = "ID: 396"]
9498#[derive(Debug, Clone, PartialEq)]
9499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9501#[cfg_attr(feature = "ts", derive(TS))]
9502#[cfg_attr(feature = "ts", ts(export))]
9503pub struct COMPONENT_INFORMATION_BASIC_DATA {
9504    #[doc = "Component capability flags"]
9505    pub capabilities: MavProtocolCapability,
9506    #[doc = "Timestamp (time since system boot)."]
9507    pub time_boot_ms: u32,
9508    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9509    pub time_manufacture_s: u32,
9510    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9511    #[cfg_attr(feature = "ts", ts(type = "string"))]
9512    pub vendor_name: CharArray<32>,
9513    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9514    #[cfg_attr(feature = "ts", ts(type = "string"))]
9515    pub model_name: CharArray<32>,
9516    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9517    #[cfg_attr(feature = "ts", ts(type = "string"))]
9518    pub software_version: CharArray<24>,
9519    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9520    #[cfg_attr(feature = "ts", ts(type = "string"))]
9521    pub hardware_version: CharArray<24>,
9522    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9523    #[cfg_attr(feature = "ts", ts(type = "string"))]
9524    pub serial_number: CharArray<32>,
9525}
9526impl COMPONENT_INFORMATION_BASIC_DATA {
9527    pub const ENCODED_LEN: usize = 160usize;
9528    pub const DEFAULT: Self = Self {
9529        capabilities: MavProtocolCapability::DEFAULT,
9530        time_boot_ms: 0_u32,
9531        time_manufacture_s: 0_u32,
9532        vendor_name: CharArray::new([0_u8; 32usize]),
9533        model_name: CharArray::new([0_u8; 32usize]),
9534        software_version: CharArray::new([0_u8; 24usize]),
9535        hardware_version: CharArray::new([0_u8; 24usize]),
9536        serial_number: CharArray::new([0_u8; 32usize]),
9537    };
9538    #[cfg(feature = "arbitrary")]
9539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9540        use arbitrary::{Arbitrary, Unstructured};
9541        let mut buf = [0u8; 1024];
9542        rng.fill_bytes(&mut buf);
9543        let mut unstructured = Unstructured::new(&buf);
9544        Self::arbitrary(&mut unstructured).unwrap_or_default()
9545    }
9546}
9547impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9548    fn default() -> Self {
9549        Self::DEFAULT.clone()
9550    }
9551}
9552impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9553    type Message = MavMessage;
9554    const ID: u32 = 396u32;
9555    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9556    const EXTRA_CRC: u8 = 50u8;
9557    const ENCODED_LEN: usize = 160usize;
9558    fn deser(
9559        _version: MavlinkVersion,
9560        __input: &[u8],
9561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9562        let avail_len = __input.len();
9563        let mut payload_buf = [0; Self::ENCODED_LEN];
9564        let mut buf = if avail_len < Self::ENCODED_LEN {
9565            payload_buf[0..avail_len].copy_from_slice(__input);
9566            Bytes::new(&payload_buf)
9567        } else {
9568            Bytes::new(__input)
9569        };
9570        let mut __struct = Self::default();
9571        let tmp = buf.get_u64_le();
9572        __struct.capabilities = MavProtocolCapability::from_bits(
9573            tmp as <MavProtocolCapability as Flags>::Bits,
9574        )
9575        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9576            flag_type: "MavProtocolCapability",
9577            value: tmp as u64,
9578        })?;
9579        __struct.time_boot_ms = buf.get_u32_le();
9580        __struct.time_manufacture_s = buf.get_u32_le();
9581        let mut tmp = [0_u8; 32usize];
9582        for v in &mut tmp {
9583            *v = buf.get_u8();
9584        }
9585        __struct.vendor_name = CharArray::new(tmp);
9586        let mut tmp = [0_u8; 32usize];
9587        for v in &mut tmp {
9588            *v = buf.get_u8();
9589        }
9590        __struct.model_name = CharArray::new(tmp);
9591        let mut tmp = [0_u8; 24usize];
9592        for v in &mut tmp {
9593            *v = buf.get_u8();
9594        }
9595        __struct.software_version = CharArray::new(tmp);
9596        let mut tmp = [0_u8; 24usize];
9597        for v in &mut tmp {
9598            *v = buf.get_u8();
9599        }
9600        __struct.hardware_version = CharArray::new(tmp);
9601        let mut tmp = [0_u8; 32usize];
9602        for v in &mut tmp {
9603            *v = buf.get_u8();
9604        }
9605        __struct.serial_number = CharArray::new(tmp);
9606        Ok(__struct)
9607    }
9608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9609        let mut __tmp = BytesMut::new(bytes);
9610        #[allow(clippy::absurd_extreme_comparisons)]
9611        #[allow(unused_comparisons)]
9612        if __tmp.remaining() < Self::ENCODED_LEN {
9613            panic!(
9614                "buffer is too small (need {} bytes, but got {})",
9615                Self::ENCODED_LEN,
9616                __tmp.remaining(),
9617            )
9618        }
9619        __tmp.put_u64_le(self.capabilities.bits() as u64);
9620        __tmp.put_u32_le(self.time_boot_ms);
9621        __tmp.put_u32_le(self.time_manufacture_s);
9622        for val in &self.vendor_name {
9623            __tmp.put_u8(*val);
9624        }
9625        for val in &self.model_name {
9626            __tmp.put_u8(*val);
9627        }
9628        for val in &self.software_version {
9629            __tmp.put_u8(*val);
9630        }
9631        for val in &self.hardware_version {
9632            __tmp.put_u8(*val);
9633        }
9634        for val in &self.serial_number {
9635            __tmp.put_u8(*val);
9636        }
9637        if matches!(version, MavlinkVersion::V2) {
9638            let len = __tmp.len();
9639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9640        } else {
9641            __tmp.len()
9642        }
9643    }
9644}
9645#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9646#[doc = ""]
9647#[doc = "ID: 397"]
9648#[derive(Debug, Clone, PartialEq)]
9649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9651#[cfg_attr(feature = "ts", derive(TS))]
9652#[cfg_attr(feature = "ts", ts(export))]
9653pub struct COMPONENT_METADATA_DATA {
9654    #[doc = "Timestamp (time since system boot)."]
9655    pub time_boot_ms: u32,
9656    #[doc = "CRC32 of the general metadata file."]
9657    pub file_crc: u32,
9658    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9659    #[cfg_attr(feature = "ts", ts(type = "string"))]
9660    pub uri: CharArray<100>,
9661}
9662impl COMPONENT_METADATA_DATA {
9663    pub const ENCODED_LEN: usize = 108usize;
9664    pub const DEFAULT: Self = Self {
9665        time_boot_ms: 0_u32,
9666        file_crc: 0_u32,
9667        uri: CharArray::new([0_u8; 100usize]),
9668    };
9669    #[cfg(feature = "arbitrary")]
9670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9671        use arbitrary::{Arbitrary, Unstructured};
9672        let mut buf = [0u8; 1024];
9673        rng.fill_bytes(&mut buf);
9674        let mut unstructured = Unstructured::new(&buf);
9675        Self::arbitrary(&mut unstructured).unwrap_or_default()
9676    }
9677}
9678impl Default for COMPONENT_METADATA_DATA {
9679    fn default() -> Self {
9680        Self::DEFAULT.clone()
9681    }
9682}
9683impl MessageData for COMPONENT_METADATA_DATA {
9684    type Message = MavMessage;
9685    const ID: u32 = 397u32;
9686    const NAME: &'static str = "COMPONENT_METADATA";
9687    const EXTRA_CRC: u8 = 182u8;
9688    const ENCODED_LEN: usize = 108usize;
9689    fn deser(
9690        _version: MavlinkVersion,
9691        __input: &[u8],
9692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9693        let avail_len = __input.len();
9694        let mut payload_buf = [0; Self::ENCODED_LEN];
9695        let mut buf = if avail_len < Self::ENCODED_LEN {
9696            payload_buf[0..avail_len].copy_from_slice(__input);
9697            Bytes::new(&payload_buf)
9698        } else {
9699            Bytes::new(__input)
9700        };
9701        let mut __struct = Self::default();
9702        __struct.time_boot_ms = buf.get_u32_le();
9703        __struct.file_crc = buf.get_u32_le();
9704        let mut tmp = [0_u8; 100usize];
9705        for v in &mut tmp {
9706            *v = buf.get_u8();
9707        }
9708        __struct.uri = CharArray::new(tmp);
9709        Ok(__struct)
9710    }
9711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9712        let mut __tmp = BytesMut::new(bytes);
9713        #[allow(clippy::absurd_extreme_comparisons)]
9714        #[allow(unused_comparisons)]
9715        if __tmp.remaining() < Self::ENCODED_LEN {
9716            panic!(
9717                "buffer is too small (need {} bytes, but got {})",
9718                Self::ENCODED_LEN,
9719                __tmp.remaining(),
9720            )
9721        }
9722        __tmp.put_u32_le(self.time_boot_ms);
9723        __tmp.put_u32_le(self.file_crc);
9724        for val in &self.uri {
9725            __tmp.put_u8(*val);
9726        }
9727        if matches!(version, MavlinkVersion::V2) {
9728            let len = __tmp.len();
9729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9730        } else {
9731            __tmp.len()
9732        }
9733    }
9734}
9735#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9736#[doc = ""]
9737#[doc = "ID: 146"]
9738#[derive(Debug, Clone, PartialEq)]
9739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9741#[cfg_attr(feature = "ts", derive(TS))]
9742#[cfg_attr(feature = "ts", ts(export))]
9743pub struct CONTROL_SYSTEM_STATE_DATA {
9744    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9745    pub time_usec: u64,
9746    #[doc = "X acceleration in body frame"]
9747    pub x_acc: f32,
9748    #[doc = "Y acceleration in body frame"]
9749    pub y_acc: f32,
9750    #[doc = "Z acceleration in body frame"]
9751    pub z_acc: f32,
9752    #[doc = "X velocity in body frame"]
9753    pub x_vel: f32,
9754    #[doc = "Y velocity in body frame"]
9755    pub y_vel: f32,
9756    #[doc = "Z velocity in body frame"]
9757    pub z_vel: f32,
9758    #[doc = "X position in local frame"]
9759    pub x_pos: f32,
9760    #[doc = "Y position in local frame"]
9761    pub y_pos: f32,
9762    #[doc = "Z position in local frame"]
9763    pub z_pos: f32,
9764    #[doc = "Airspeed, set to -1 if unknown"]
9765    pub airspeed: f32,
9766    #[doc = "Variance of body velocity estimate"]
9767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9768    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9769    pub vel_variance: [f32; 3],
9770    #[doc = "Variance in local position"]
9771    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9772    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9773    pub pos_variance: [f32; 3],
9774    #[doc = "The attitude, represented as Quaternion"]
9775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9777    pub q: [f32; 4],
9778    #[doc = "Angular rate in roll axis"]
9779    pub roll_rate: f32,
9780    #[doc = "Angular rate in pitch axis"]
9781    pub pitch_rate: f32,
9782    #[doc = "Angular rate in yaw axis"]
9783    pub yaw_rate: f32,
9784}
9785impl CONTROL_SYSTEM_STATE_DATA {
9786    pub const ENCODED_LEN: usize = 100usize;
9787    pub const DEFAULT: Self = Self {
9788        time_usec: 0_u64,
9789        x_acc: 0.0_f32,
9790        y_acc: 0.0_f32,
9791        z_acc: 0.0_f32,
9792        x_vel: 0.0_f32,
9793        y_vel: 0.0_f32,
9794        z_vel: 0.0_f32,
9795        x_pos: 0.0_f32,
9796        y_pos: 0.0_f32,
9797        z_pos: 0.0_f32,
9798        airspeed: 0.0_f32,
9799        vel_variance: [0.0_f32; 3usize],
9800        pos_variance: [0.0_f32; 3usize],
9801        q: [0.0_f32; 4usize],
9802        roll_rate: 0.0_f32,
9803        pitch_rate: 0.0_f32,
9804        yaw_rate: 0.0_f32,
9805    };
9806    #[cfg(feature = "arbitrary")]
9807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9808        use arbitrary::{Arbitrary, Unstructured};
9809        let mut buf = [0u8; 1024];
9810        rng.fill_bytes(&mut buf);
9811        let mut unstructured = Unstructured::new(&buf);
9812        Self::arbitrary(&mut unstructured).unwrap_or_default()
9813    }
9814}
9815impl Default for CONTROL_SYSTEM_STATE_DATA {
9816    fn default() -> Self {
9817        Self::DEFAULT.clone()
9818    }
9819}
9820impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9821    type Message = MavMessage;
9822    const ID: u32 = 146u32;
9823    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9824    const EXTRA_CRC: u8 = 103u8;
9825    const ENCODED_LEN: usize = 100usize;
9826    fn deser(
9827        _version: MavlinkVersion,
9828        __input: &[u8],
9829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9830        let avail_len = __input.len();
9831        let mut payload_buf = [0; Self::ENCODED_LEN];
9832        let mut buf = if avail_len < Self::ENCODED_LEN {
9833            payload_buf[0..avail_len].copy_from_slice(__input);
9834            Bytes::new(&payload_buf)
9835        } else {
9836            Bytes::new(__input)
9837        };
9838        let mut __struct = Self::default();
9839        __struct.time_usec = buf.get_u64_le();
9840        __struct.x_acc = buf.get_f32_le();
9841        __struct.y_acc = buf.get_f32_le();
9842        __struct.z_acc = buf.get_f32_le();
9843        __struct.x_vel = buf.get_f32_le();
9844        __struct.y_vel = buf.get_f32_le();
9845        __struct.z_vel = buf.get_f32_le();
9846        __struct.x_pos = buf.get_f32_le();
9847        __struct.y_pos = buf.get_f32_le();
9848        __struct.z_pos = buf.get_f32_le();
9849        __struct.airspeed = buf.get_f32_le();
9850        for v in &mut __struct.vel_variance {
9851            let val = buf.get_f32_le();
9852            *v = val;
9853        }
9854        for v in &mut __struct.pos_variance {
9855            let val = buf.get_f32_le();
9856            *v = val;
9857        }
9858        for v in &mut __struct.q {
9859            let val = buf.get_f32_le();
9860            *v = val;
9861        }
9862        __struct.roll_rate = buf.get_f32_le();
9863        __struct.pitch_rate = buf.get_f32_le();
9864        __struct.yaw_rate = buf.get_f32_le();
9865        Ok(__struct)
9866    }
9867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9868        let mut __tmp = BytesMut::new(bytes);
9869        #[allow(clippy::absurd_extreme_comparisons)]
9870        #[allow(unused_comparisons)]
9871        if __tmp.remaining() < Self::ENCODED_LEN {
9872            panic!(
9873                "buffer is too small (need {} bytes, but got {})",
9874                Self::ENCODED_LEN,
9875                __tmp.remaining(),
9876            )
9877        }
9878        __tmp.put_u64_le(self.time_usec);
9879        __tmp.put_f32_le(self.x_acc);
9880        __tmp.put_f32_le(self.y_acc);
9881        __tmp.put_f32_le(self.z_acc);
9882        __tmp.put_f32_le(self.x_vel);
9883        __tmp.put_f32_le(self.y_vel);
9884        __tmp.put_f32_le(self.z_vel);
9885        __tmp.put_f32_le(self.x_pos);
9886        __tmp.put_f32_le(self.y_pos);
9887        __tmp.put_f32_le(self.z_pos);
9888        __tmp.put_f32_le(self.airspeed);
9889        for val in &self.vel_variance {
9890            __tmp.put_f32_le(*val);
9891        }
9892        for val in &self.pos_variance {
9893            __tmp.put_f32_le(*val);
9894        }
9895        for val in &self.q {
9896            __tmp.put_f32_le(*val);
9897        }
9898        __tmp.put_f32_le(self.roll_rate);
9899        __tmp.put_f32_le(self.pitch_rate);
9900        __tmp.put_f32_le(self.yaw_rate);
9901        if matches!(version, MavlinkVersion::V2) {
9902            let len = __tmp.len();
9903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9904        } else {
9905            __tmp.len()
9906        }
9907    }
9908}
9909#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9910#[doc = ""]
9911#[doc = "ID: 411"]
9912#[derive(Debug, Clone, PartialEq)]
9913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9915#[cfg_attr(feature = "ts", derive(TS))]
9916#[cfg_attr(feature = "ts", ts(export))]
9917pub struct CURRENT_EVENT_SEQUENCE_DATA {
9918    #[doc = "Sequence number."]
9919    pub sequence: u16,
9920    #[doc = "Flag bitset."]
9921    pub flags: MavEventCurrentSequenceFlags,
9922}
9923impl CURRENT_EVENT_SEQUENCE_DATA {
9924    pub const ENCODED_LEN: usize = 3usize;
9925    pub const DEFAULT: Self = Self {
9926        sequence: 0_u16,
9927        flags: MavEventCurrentSequenceFlags::DEFAULT,
9928    };
9929    #[cfg(feature = "arbitrary")]
9930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9931        use arbitrary::{Arbitrary, Unstructured};
9932        let mut buf = [0u8; 1024];
9933        rng.fill_bytes(&mut buf);
9934        let mut unstructured = Unstructured::new(&buf);
9935        Self::arbitrary(&mut unstructured).unwrap_or_default()
9936    }
9937}
9938impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9939    fn default() -> Self {
9940        Self::DEFAULT.clone()
9941    }
9942}
9943impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9944    type Message = MavMessage;
9945    const ID: u32 = 411u32;
9946    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9947    const EXTRA_CRC: u8 = 106u8;
9948    const ENCODED_LEN: usize = 3usize;
9949    fn deser(
9950        _version: MavlinkVersion,
9951        __input: &[u8],
9952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9953        let avail_len = __input.len();
9954        let mut payload_buf = [0; Self::ENCODED_LEN];
9955        let mut buf = if avail_len < Self::ENCODED_LEN {
9956            payload_buf[0..avail_len].copy_from_slice(__input);
9957            Bytes::new(&payload_buf)
9958        } else {
9959            Bytes::new(__input)
9960        };
9961        let mut __struct = Self::default();
9962        __struct.sequence = buf.get_u16_le();
9963        let tmp = buf.get_u8();
9964        __struct.flags =
9965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9966                enum_type: "MavEventCurrentSequenceFlags",
9967                value: tmp as u64,
9968            })?;
9969        Ok(__struct)
9970    }
9971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9972        let mut __tmp = BytesMut::new(bytes);
9973        #[allow(clippy::absurd_extreme_comparisons)]
9974        #[allow(unused_comparisons)]
9975        if __tmp.remaining() < Self::ENCODED_LEN {
9976            panic!(
9977                "buffer is too small (need {} bytes, but got {})",
9978                Self::ENCODED_LEN,
9979                __tmp.remaining(),
9980            )
9981        }
9982        __tmp.put_u16_le(self.sequence);
9983        __tmp.put_u8(self.flags as u8);
9984        if matches!(version, MavlinkVersion::V2) {
9985            let len = __tmp.len();
9986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9987        } else {
9988            __tmp.len()
9989        }
9990    }
9991}
9992#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9993#[doc = ""]
9994#[doc = "ID: 436"]
9995#[derive(Debug, Clone, PartialEq)]
9996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9998#[cfg_attr(feature = "ts", derive(TS))]
9999#[cfg_attr(feature = "ts", ts(export))]
10000pub struct CURRENT_MODE_DATA {
10001    #[doc = "A bitfield for use for autopilot-specific flags"]
10002    pub custom_mode: u32,
10003    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10004    pub intended_custom_mode: u32,
10005    #[doc = "Standard mode."]
10006    pub standard_mode: MavStandardMode,
10007}
10008impl CURRENT_MODE_DATA {
10009    pub const ENCODED_LEN: usize = 9usize;
10010    pub const DEFAULT: Self = Self {
10011        custom_mode: 0_u32,
10012        intended_custom_mode: 0_u32,
10013        standard_mode: MavStandardMode::DEFAULT,
10014    };
10015    #[cfg(feature = "arbitrary")]
10016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10017        use arbitrary::{Arbitrary, Unstructured};
10018        let mut buf = [0u8; 1024];
10019        rng.fill_bytes(&mut buf);
10020        let mut unstructured = Unstructured::new(&buf);
10021        Self::arbitrary(&mut unstructured).unwrap_or_default()
10022    }
10023}
10024impl Default for CURRENT_MODE_DATA {
10025    fn default() -> Self {
10026        Self::DEFAULT.clone()
10027    }
10028}
10029impl MessageData for CURRENT_MODE_DATA {
10030    type Message = MavMessage;
10031    const ID: u32 = 436u32;
10032    const NAME: &'static str = "CURRENT_MODE";
10033    const EXTRA_CRC: u8 = 193u8;
10034    const ENCODED_LEN: usize = 9usize;
10035    fn deser(
10036        _version: MavlinkVersion,
10037        __input: &[u8],
10038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10039        let avail_len = __input.len();
10040        let mut payload_buf = [0; Self::ENCODED_LEN];
10041        let mut buf = if avail_len < Self::ENCODED_LEN {
10042            payload_buf[0..avail_len].copy_from_slice(__input);
10043            Bytes::new(&payload_buf)
10044        } else {
10045            Bytes::new(__input)
10046        };
10047        let mut __struct = Self::default();
10048        __struct.custom_mode = buf.get_u32_le();
10049        __struct.intended_custom_mode = buf.get_u32_le();
10050        let tmp = buf.get_u8();
10051        __struct.standard_mode =
10052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10053                enum_type: "MavStandardMode",
10054                value: tmp as u64,
10055            })?;
10056        Ok(__struct)
10057    }
10058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10059        let mut __tmp = BytesMut::new(bytes);
10060        #[allow(clippy::absurd_extreme_comparisons)]
10061        #[allow(unused_comparisons)]
10062        if __tmp.remaining() < Self::ENCODED_LEN {
10063            panic!(
10064                "buffer is too small (need {} bytes, but got {})",
10065                Self::ENCODED_LEN,
10066                __tmp.remaining(),
10067            )
10068        }
10069        __tmp.put_u32_le(self.custom_mode);
10070        __tmp.put_u32_le(self.intended_custom_mode);
10071        __tmp.put_u8(self.standard_mode as u8);
10072        if matches!(version, MavlinkVersion::V2) {
10073            let len = __tmp.len();
10074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10075        } else {
10076            __tmp.len()
10077        }
10078    }
10079}
10080#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10081#[doc = "Data stream status information."]
10082#[doc = ""]
10083#[doc = "ID: 67"]
10084#[derive(Debug, Clone, PartialEq)]
10085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10087#[cfg_attr(feature = "ts", derive(TS))]
10088#[cfg_attr(feature = "ts", ts(export))]
10089pub struct DATA_STREAM_DATA {
10090    #[doc = "The message rate"]
10091    pub message_rate: u16,
10092    #[doc = "The ID of the requested data stream"]
10093    pub stream_id: u8,
10094    #[doc = "1 stream is enabled, 0 stream is stopped."]
10095    pub on_off: u8,
10096}
10097impl DATA_STREAM_DATA {
10098    pub const ENCODED_LEN: usize = 4usize;
10099    pub const DEFAULT: Self = Self {
10100        message_rate: 0_u16,
10101        stream_id: 0_u8,
10102        on_off: 0_u8,
10103    };
10104    #[cfg(feature = "arbitrary")]
10105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10106        use arbitrary::{Arbitrary, Unstructured};
10107        let mut buf = [0u8; 1024];
10108        rng.fill_bytes(&mut buf);
10109        let mut unstructured = Unstructured::new(&buf);
10110        Self::arbitrary(&mut unstructured).unwrap_or_default()
10111    }
10112}
10113impl Default for DATA_STREAM_DATA {
10114    fn default() -> Self {
10115        Self::DEFAULT.clone()
10116    }
10117}
10118impl MessageData for DATA_STREAM_DATA {
10119    type Message = MavMessage;
10120    const ID: u32 = 67u32;
10121    const NAME: &'static str = "DATA_STREAM";
10122    const EXTRA_CRC: u8 = 21u8;
10123    const ENCODED_LEN: usize = 4usize;
10124    fn deser(
10125        _version: MavlinkVersion,
10126        __input: &[u8],
10127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10128        let avail_len = __input.len();
10129        let mut payload_buf = [0; Self::ENCODED_LEN];
10130        let mut buf = if avail_len < Self::ENCODED_LEN {
10131            payload_buf[0..avail_len].copy_from_slice(__input);
10132            Bytes::new(&payload_buf)
10133        } else {
10134            Bytes::new(__input)
10135        };
10136        let mut __struct = Self::default();
10137        __struct.message_rate = buf.get_u16_le();
10138        __struct.stream_id = buf.get_u8();
10139        __struct.on_off = buf.get_u8();
10140        Ok(__struct)
10141    }
10142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10143        let mut __tmp = BytesMut::new(bytes);
10144        #[allow(clippy::absurd_extreme_comparisons)]
10145        #[allow(unused_comparisons)]
10146        if __tmp.remaining() < Self::ENCODED_LEN {
10147            panic!(
10148                "buffer is too small (need {} bytes, but got {})",
10149                Self::ENCODED_LEN,
10150                __tmp.remaining(),
10151            )
10152        }
10153        __tmp.put_u16_le(self.message_rate);
10154        __tmp.put_u8(self.stream_id);
10155        __tmp.put_u8(self.on_off);
10156        if matches!(version, MavlinkVersion::V2) {
10157            let len = __tmp.len();
10158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10159        } else {
10160            __tmp.len()
10161        }
10162    }
10163}
10164#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10165#[doc = ""]
10166#[doc = "ID: 130"]
10167#[derive(Debug, Clone, PartialEq)]
10168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10170#[cfg_attr(feature = "ts", derive(TS))]
10171#[cfg_attr(feature = "ts", ts(export))]
10172pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10173    #[doc = "total data size (set on ACK only)."]
10174    pub size: u32,
10175    #[doc = "Width of a matrix or image."]
10176    pub width: u16,
10177    #[doc = "Height of a matrix or image."]
10178    pub height: u16,
10179    #[doc = "Number of packets being sent (set on ACK only)."]
10180    pub packets: u16,
10181    #[doc = "Type of requested/acknowledged data."]
10182    pub mavtype: MavlinkDataStreamType,
10183    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10184    pub payload: u8,
10185    #[doc = "JPEG quality. Values: [1-100]."]
10186    pub jpg_quality: u8,
10187}
10188impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10189    pub const ENCODED_LEN: usize = 13usize;
10190    pub const DEFAULT: Self = Self {
10191        size: 0_u32,
10192        width: 0_u16,
10193        height: 0_u16,
10194        packets: 0_u16,
10195        mavtype: MavlinkDataStreamType::DEFAULT,
10196        payload: 0_u8,
10197        jpg_quality: 0_u8,
10198    };
10199    #[cfg(feature = "arbitrary")]
10200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10201        use arbitrary::{Arbitrary, Unstructured};
10202        let mut buf = [0u8; 1024];
10203        rng.fill_bytes(&mut buf);
10204        let mut unstructured = Unstructured::new(&buf);
10205        Self::arbitrary(&mut unstructured).unwrap_or_default()
10206    }
10207}
10208impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10209    fn default() -> Self {
10210        Self::DEFAULT.clone()
10211    }
10212}
10213impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10214    type Message = MavMessage;
10215    const ID: u32 = 130u32;
10216    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10217    const EXTRA_CRC: u8 = 29u8;
10218    const ENCODED_LEN: usize = 13usize;
10219    fn deser(
10220        _version: MavlinkVersion,
10221        __input: &[u8],
10222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10223        let avail_len = __input.len();
10224        let mut payload_buf = [0; Self::ENCODED_LEN];
10225        let mut buf = if avail_len < Self::ENCODED_LEN {
10226            payload_buf[0..avail_len].copy_from_slice(__input);
10227            Bytes::new(&payload_buf)
10228        } else {
10229            Bytes::new(__input)
10230        };
10231        let mut __struct = Self::default();
10232        __struct.size = buf.get_u32_le();
10233        __struct.width = buf.get_u16_le();
10234        __struct.height = buf.get_u16_le();
10235        __struct.packets = buf.get_u16_le();
10236        let tmp = buf.get_u8();
10237        __struct.mavtype =
10238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10239                enum_type: "MavlinkDataStreamType",
10240                value: tmp as u64,
10241            })?;
10242        __struct.payload = buf.get_u8();
10243        __struct.jpg_quality = buf.get_u8();
10244        Ok(__struct)
10245    }
10246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10247        let mut __tmp = BytesMut::new(bytes);
10248        #[allow(clippy::absurd_extreme_comparisons)]
10249        #[allow(unused_comparisons)]
10250        if __tmp.remaining() < Self::ENCODED_LEN {
10251            panic!(
10252                "buffer is too small (need {} bytes, but got {})",
10253                Self::ENCODED_LEN,
10254                __tmp.remaining(),
10255            )
10256        }
10257        __tmp.put_u32_le(self.size);
10258        __tmp.put_u16_le(self.width);
10259        __tmp.put_u16_le(self.height);
10260        __tmp.put_u16_le(self.packets);
10261        __tmp.put_u8(self.mavtype as u8);
10262        __tmp.put_u8(self.payload);
10263        __tmp.put_u8(self.jpg_quality);
10264        if matches!(version, MavlinkVersion::V2) {
10265            let len = __tmp.len();
10266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10267        } else {
10268            __tmp.len()
10269        }
10270    }
10271}
10272#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10273#[doc = ""]
10274#[doc = "ID: 254"]
10275#[derive(Debug, Clone, PartialEq)]
10276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10278#[cfg_attr(feature = "ts", derive(TS))]
10279#[cfg_attr(feature = "ts", ts(export))]
10280pub struct DEBUG_DATA {
10281    #[doc = "Timestamp (time since system boot)."]
10282    pub time_boot_ms: u32,
10283    #[doc = "DEBUG value"]
10284    pub value: f32,
10285    #[doc = "index of debug variable"]
10286    pub ind: u8,
10287}
10288impl DEBUG_DATA {
10289    pub const ENCODED_LEN: usize = 9usize;
10290    pub const DEFAULT: Self = Self {
10291        time_boot_ms: 0_u32,
10292        value: 0.0_f32,
10293        ind: 0_u8,
10294    };
10295    #[cfg(feature = "arbitrary")]
10296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10297        use arbitrary::{Arbitrary, Unstructured};
10298        let mut buf = [0u8; 1024];
10299        rng.fill_bytes(&mut buf);
10300        let mut unstructured = Unstructured::new(&buf);
10301        Self::arbitrary(&mut unstructured).unwrap_or_default()
10302    }
10303}
10304impl Default for DEBUG_DATA {
10305    fn default() -> Self {
10306        Self::DEFAULT.clone()
10307    }
10308}
10309impl MessageData for DEBUG_DATA {
10310    type Message = MavMessage;
10311    const ID: u32 = 254u32;
10312    const NAME: &'static str = "DEBUG";
10313    const EXTRA_CRC: u8 = 46u8;
10314    const ENCODED_LEN: usize = 9usize;
10315    fn deser(
10316        _version: MavlinkVersion,
10317        __input: &[u8],
10318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10319        let avail_len = __input.len();
10320        let mut payload_buf = [0; Self::ENCODED_LEN];
10321        let mut buf = if avail_len < Self::ENCODED_LEN {
10322            payload_buf[0..avail_len].copy_from_slice(__input);
10323            Bytes::new(&payload_buf)
10324        } else {
10325            Bytes::new(__input)
10326        };
10327        let mut __struct = Self::default();
10328        __struct.time_boot_ms = buf.get_u32_le();
10329        __struct.value = buf.get_f32_le();
10330        __struct.ind = buf.get_u8();
10331        Ok(__struct)
10332    }
10333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10334        let mut __tmp = BytesMut::new(bytes);
10335        #[allow(clippy::absurd_extreme_comparisons)]
10336        #[allow(unused_comparisons)]
10337        if __tmp.remaining() < Self::ENCODED_LEN {
10338            panic!(
10339                "buffer is too small (need {} bytes, but got {})",
10340                Self::ENCODED_LEN,
10341                __tmp.remaining(),
10342            )
10343        }
10344        __tmp.put_u32_le(self.time_boot_ms);
10345        __tmp.put_f32_le(self.value);
10346        __tmp.put_u8(self.ind);
10347        if matches!(version, MavlinkVersion::V2) {
10348            let len = __tmp.len();
10349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10350        } else {
10351            __tmp.len()
10352        }
10353    }
10354}
10355#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10356#[doc = ""]
10357#[doc = "ID: 350"]
10358#[derive(Debug, Clone, PartialEq)]
10359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10361#[cfg_attr(feature = "ts", derive(TS))]
10362#[cfg_attr(feature = "ts", ts(export))]
10363pub struct DEBUG_FLOAT_ARRAY_DATA {
10364    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10365    pub time_usec: u64,
10366    #[doc = "Unique ID used to discriminate between arrays"]
10367    pub array_id: u16,
10368    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10369    #[cfg_attr(feature = "ts", ts(type = "string"))]
10370    pub name: CharArray<10>,
10371    #[doc = "data"]
10372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10375    pub data: [f32; 58],
10376}
10377impl DEBUG_FLOAT_ARRAY_DATA {
10378    pub const ENCODED_LEN: usize = 252usize;
10379    pub const DEFAULT: Self = Self {
10380        time_usec: 0_u64,
10381        array_id: 0_u16,
10382        name: CharArray::new([0_u8; 10usize]),
10383        data: [0.0_f32; 58usize],
10384    };
10385    #[cfg(feature = "arbitrary")]
10386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10387        use arbitrary::{Arbitrary, Unstructured};
10388        let mut buf = [0u8; 1024];
10389        rng.fill_bytes(&mut buf);
10390        let mut unstructured = Unstructured::new(&buf);
10391        Self::arbitrary(&mut unstructured).unwrap_or_default()
10392    }
10393}
10394impl Default for DEBUG_FLOAT_ARRAY_DATA {
10395    fn default() -> Self {
10396        Self::DEFAULT.clone()
10397    }
10398}
10399impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10400    type Message = MavMessage;
10401    const ID: u32 = 350u32;
10402    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10403    const EXTRA_CRC: u8 = 232u8;
10404    const ENCODED_LEN: usize = 252usize;
10405    fn deser(
10406        _version: MavlinkVersion,
10407        __input: &[u8],
10408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10409        let avail_len = __input.len();
10410        let mut payload_buf = [0; Self::ENCODED_LEN];
10411        let mut buf = if avail_len < Self::ENCODED_LEN {
10412            payload_buf[0..avail_len].copy_from_slice(__input);
10413            Bytes::new(&payload_buf)
10414        } else {
10415            Bytes::new(__input)
10416        };
10417        let mut __struct = Self::default();
10418        __struct.time_usec = buf.get_u64_le();
10419        __struct.array_id = buf.get_u16_le();
10420        let mut tmp = [0_u8; 10usize];
10421        for v in &mut tmp {
10422            *v = buf.get_u8();
10423        }
10424        __struct.name = CharArray::new(tmp);
10425        for v in &mut __struct.data {
10426            let val = buf.get_f32_le();
10427            *v = val;
10428        }
10429        Ok(__struct)
10430    }
10431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10432        let mut __tmp = BytesMut::new(bytes);
10433        #[allow(clippy::absurd_extreme_comparisons)]
10434        #[allow(unused_comparisons)]
10435        if __tmp.remaining() < Self::ENCODED_LEN {
10436            panic!(
10437                "buffer is too small (need {} bytes, but got {})",
10438                Self::ENCODED_LEN,
10439                __tmp.remaining(),
10440            )
10441        }
10442        __tmp.put_u64_le(self.time_usec);
10443        __tmp.put_u16_le(self.array_id);
10444        for val in &self.name {
10445            __tmp.put_u8(*val);
10446        }
10447        if matches!(version, MavlinkVersion::V2) {
10448            for val in &self.data {
10449                __tmp.put_f32_le(*val);
10450            }
10451            let len = __tmp.len();
10452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10453        } else {
10454            __tmp.len()
10455        }
10456    }
10457}
10458#[doc = "To debug something using a named 3D vector."]
10459#[doc = ""]
10460#[doc = "ID: 250"]
10461#[derive(Debug, Clone, PartialEq)]
10462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10464#[cfg_attr(feature = "ts", derive(TS))]
10465#[cfg_attr(feature = "ts", ts(export))]
10466pub struct DEBUG_VECT_DATA {
10467    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10468    pub time_usec: u64,
10469    #[doc = "x"]
10470    pub x: f32,
10471    #[doc = "y"]
10472    pub y: f32,
10473    #[doc = "z"]
10474    pub z: f32,
10475    #[doc = "Name"]
10476    #[cfg_attr(feature = "ts", ts(type = "string"))]
10477    pub name: CharArray<10>,
10478}
10479impl DEBUG_VECT_DATA {
10480    pub const ENCODED_LEN: usize = 30usize;
10481    pub const DEFAULT: Self = Self {
10482        time_usec: 0_u64,
10483        x: 0.0_f32,
10484        y: 0.0_f32,
10485        z: 0.0_f32,
10486        name: CharArray::new([0_u8; 10usize]),
10487    };
10488    #[cfg(feature = "arbitrary")]
10489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10490        use arbitrary::{Arbitrary, Unstructured};
10491        let mut buf = [0u8; 1024];
10492        rng.fill_bytes(&mut buf);
10493        let mut unstructured = Unstructured::new(&buf);
10494        Self::arbitrary(&mut unstructured).unwrap_or_default()
10495    }
10496}
10497impl Default for DEBUG_VECT_DATA {
10498    fn default() -> Self {
10499        Self::DEFAULT.clone()
10500    }
10501}
10502impl MessageData for DEBUG_VECT_DATA {
10503    type Message = MavMessage;
10504    const ID: u32 = 250u32;
10505    const NAME: &'static str = "DEBUG_VECT";
10506    const EXTRA_CRC: u8 = 49u8;
10507    const ENCODED_LEN: usize = 30usize;
10508    fn deser(
10509        _version: MavlinkVersion,
10510        __input: &[u8],
10511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10512        let avail_len = __input.len();
10513        let mut payload_buf = [0; Self::ENCODED_LEN];
10514        let mut buf = if avail_len < Self::ENCODED_LEN {
10515            payload_buf[0..avail_len].copy_from_slice(__input);
10516            Bytes::new(&payload_buf)
10517        } else {
10518            Bytes::new(__input)
10519        };
10520        let mut __struct = Self::default();
10521        __struct.time_usec = buf.get_u64_le();
10522        __struct.x = buf.get_f32_le();
10523        __struct.y = buf.get_f32_le();
10524        __struct.z = buf.get_f32_le();
10525        let mut tmp = [0_u8; 10usize];
10526        for v in &mut tmp {
10527            *v = buf.get_u8();
10528        }
10529        __struct.name = CharArray::new(tmp);
10530        Ok(__struct)
10531    }
10532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10533        let mut __tmp = BytesMut::new(bytes);
10534        #[allow(clippy::absurd_extreme_comparisons)]
10535        #[allow(unused_comparisons)]
10536        if __tmp.remaining() < Self::ENCODED_LEN {
10537            panic!(
10538                "buffer is too small (need {} bytes, but got {})",
10539                Self::ENCODED_LEN,
10540                __tmp.remaining(),
10541            )
10542        }
10543        __tmp.put_u64_le(self.time_usec);
10544        __tmp.put_f32_le(self.x);
10545        __tmp.put_f32_le(self.y);
10546        __tmp.put_f32_le(self.z);
10547        for val in &self.name {
10548            __tmp.put_u8(*val);
10549        }
10550        if matches!(version, MavlinkVersion::V2) {
10551            let len = __tmp.len();
10552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10553        } else {
10554            __tmp.len()
10555        }
10556    }
10557}
10558#[doc = "Distance sensor information for an onboard rangefinder."]
10559#[doc = ""]
10560#[doc = "ID: 132"]
10561#[derive(Debug, Clone, PartialEq)]
10562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10564#[cfg_attr(feature = "ts", derive(TS))]
10565#[cfg_attr(feature = "ts", ts(export))]
10566pub struct DISTANCE_SENSOR_DATA {
10567    #[doc = "Timestamp (time since system boot)."]
10568    pub time_boot_ms: u32,
10569    #[doc = "Minimum distance the sensor can measure"]
10570    pub min_distance: u16,
10571    #[doc = "Maximum distance the sensor can measure"]
10572    pub max_distance: u16,
10573    #[doc = "Current distance reading"]
10574    pub current_distance: u16,
10575    #[doc = "Type of distance sensor."]
10576    pub mavtype: MavDistanceSensor,
10577    #[doc = "Onboard ID of the sensor"]
10578    pub id: u8,
10579    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10580    pub orientation: MavSensorOrientation,
10581    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10582    pub covariance: u8,
10583    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10585    pub horizontal_fov: f32,
10586    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10588    pub vertical_fov: f32,
10589    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10592    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10593    pub quaternion: [f32; 4],
10594    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10596    pub signal_quality: u8,
10597}
10598impl DISTANCE_SENSOR_DATA {
10599    pub const ENCODED_LEN: usize = 39usize;
10600    pub const DEFAULT: Self = Self {
10601        time_boot_ms: 0_u32,
10602        min_distance: 0_u16,
10603        max_distance: 0_u16,
10604        current_distance: 0_u16,
10605        mavtype: MavDistanceSensor::DEFAULT,
10606        id: 0_u8,
10607        orientation: MavSensorOrientation::DEFAULT,
10608        covariance: 0_u8,
10609        horizontal_fov: 0.0_f32,
10610        vertical_fov: 0.0_f32,
10611        quaternion: [0.0_f32; 4usize],
10612        signal_quality: 0_u8,
10613    };
10614    #[cfg(feature = "arbitrary")]
10615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10616        use arbitrary::{Arbitrary, Unstructured};
10617        let mut buf = [0u8; 1024];
10618        rng.fill_bytes(&mut buf);
10619        let mut unstructured = Unstructured::new(&buf);
10620        Self::arbitrary(&mut unstructured).unwrap_or_default()
10621    }
10622}
10623impl Default for DISTANCE_SENSOR_DATA {
10624    fn default() -> Self {
10625        Self::DEFAULT.clone()
10626    }
10627}
10628impl MessageData for DISTANCE_SENSOR_DATA {
10629    type Message = MavMessage;
10630    const ID: u32 = 132u32;
10631    const NAME: &'static str = "DISTANCE_SENSOR";
10632    const EXTRA_CRC: u8 = 85u8;
10633    const ENCODED_LEN: usize = 39usize;
10634    fn deser(
10635        _version: MavlinkVersion,
10636        __input: &[u8],
10637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10638        let avail_len = __input.len();
10639        let mut payload_buf = [0; Self::ENCODED_LEN];
10640        let mut buf = if avail_len < Self::ENCODED_LEN {
10641            payload_buf[0..avail_len].copy_from_slice(__input);
10642            Bytes::new(&payload_buf)
10643        } else {
10644            Bytes::new(__input)
10645        };
10646        let mut __struct = Self::default();
10647        __struct.time_boot_ms = buf.get_u32_le();
10648        __struct.min_distance = buf.get_u16_le();
10649        __struct.max_distance = buf.get_u16_le();
10650        __struct.current_distance = buf.get_u16_le();
10651        let tmp = buf.get_u8();
10652        __struct.mavtype =
10653            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10654                enum_type: "MavDistanceSensor",
10655                value: tmp as u64,
10656            })?;
10657        __struct.id = buf.get_u8();
10658        let tmp = buf.get_u8();
10659        __struct.orientation =
10660            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10661                enum_type: "MavSensorOrientation",
10662                value: tmp as u64,
10663            })?;
10664        __struct.covariance = buf.get_u8();
10665        __struct.horizontal_fov = buf.get_f32_le();
10666        __struct.vertical_fov = buf.get_f32_le();
10667        for v in &mut __struct.quaternion {
10668            let val = buf.get_f32_le();
10669            *v = val;
10670        }
10671        __struct.signal_quality = buf.get_u8();
10672        Ok(__struct)
10673    }
10674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10675        let mut __tmp = BytesMut::new(bytes);
10676        #[allow(clippy::absurd_extreme_comparisons)]
10677        #[allow(unused_comparisons)]
10678        if __tmp.remaining() < Self::ENCODED_LEN {
10679            panic!(
10680                "buffer is too small (need {} bytes, but got {})",
10681                Self::ENCODED_LEN,
10682                __tmp.remaining(),
10683            )
10684        }
10685        __tmp.put_u32_le(self.time_boot_ms);
10686        __tmp.put_u16_le(self.min_distance);
10687        __tmp.put_u16_le(self.max_distance);
10688        __tmp.put_u16_le(self.current_distance);
10689        __tmp.put_u8(self.mavtype as u8);
10690        __tmp.put_u8(self.id);
10691        __tmp.put_u8(self.orientation as u8);
10692        __tmp.put_u8(self.covariance);
10693        if matches!(version, MavlinkVersion::V2) {
10694            __tmp.put_f32_le(self.horizontal_fov);
10695            __tmp.put_f32_le(self.vertical_fov);
10696            for val in &self.quaternion {
10697                __tmp.put_f32_le(*val);
10698            }
10699            __tmp.put_u8(self.signal_quality);
10700            let len = __tmp.len();
10701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10702        } else {
10703            __tmp.len()
10704        }
10705    }
10706}
10707#[doc = "EFI status output."]
10708#[doc = ""]
10709#[doc = "ID: 225"]
10710#[derive(Debug, Clone, PartialEq)]
10711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10713#[cfg_attr(feature = "ts", derive(TS))]
10714#[cfg_attr(feature = "ts", ts(export))]
10715pub struct EFI_STATUS_DATA {
10716    #[doc = "ECU index"]
10717    pub ecu_index: f32,
10718    #[doc = "RPM"]
10719    pub rpm: f32,
10720    #[doc = "Fuel consumed"]
10721    pub fuel_consumed: f32,
10722    #[doc = "Fuel flow rate"]
10723    pub fuel_flow: f32,
10724    #[doc = "Engine load"]
10725    pub engine_load: f32,
10726    #[doc = "Throttle position"]
10727    pub throttle_position: f32,
10728    #[doc = "Spark dwell time"]
10729    pub spark_dwell_time: f32,
10730    #[doc = "Barometric pressure"]
10731    pub barometric_pressure: f32,
10732    #[doc = "Intake manifold pressure("]
10733    pub intake_manifold_pressure: f32,
10734    #[doc = "Intake manifold temperature"]
10735    pub intake_manifold_temperature: f32,
10736    #[doc = "Cylinder head temperature"]
10737    pub cylinder_head_temperature: f32,
10738    #[doc = "Ignition timing (Crank angle degrees)"]
10739    pub ignition_timing: f32,
10740    #[doc = "Injection time"]
10741    pub injection_time: f32,
10742    #[doc = "Exhaust gas temperature"]
10743    pub exhaust_gas_temperature: f32,
10744    #[doc = "Output throttle"]
10745    pub throttle_out: f32,
10746    #[doc = "Pressure/temperature compensation"]
10747    pub pt_compensation: f32,
10748    #[doc = "EFI health status"]
10749    pub health: u8,
10750    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10752    pub ignition_voltage: f32,
10753    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10755    pub fuel_pressure: f32,
10756}
10757impl EFI_STATUS_DATA {
10758    pub const ENCODED_LEN: usize = 73usize;
10759    pub const DEFAULT: Self = Self {
10760        ecu_index: 0.0_f32,
10761        rpm: 0.0_f32,
10762        fuel_consumed: 0.0_f32,
10763        fuel_flow: 0.0_f32,
10764        engine_load: 0.0_f32,
10765        throttle_position: 0.0_f32,
10766        spark_dwell_time: 0.0_f32,
10767        barometric_pressure: 0.0_f32,
10768        intake_manifold_pressure: 0.0_f32,
10769        intake_manifold_temperature: 0.0_f32,
10770        cylinder_head_temperature: 0.0_f32,
10771        ignition_timing: 0.0_f32,
10772        injection_time: 0.0_f32,
10773        exhaust_gas_temperature: 0.0_f32,
10774        throttle_out: 0.0_f32,
10775        pt_compensation: 0.0_f32,
10776        health: 0_u8,
10777        ignition_voltage: 0.0_f32,
10778        fuel_pressure: 0.0_f32,
10779    };
10780    #[cfg(feature = "arbitrary")]
10781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10782        use arbitrary::{Arbitrary, Unstructured};
10783        let mut buf = [0u8; 1024];
10784        rng.fill_bytes(&mut buf);
10785        let mut unstructured = Unstructured::new(&buf);
10786        Self::arbitrary(&mut unstructured).unwrap_or_default()
10787    }
10788}
10789impl Default for EFI_STATUS_DATA {
10790    fn default() -> Self {
10791        Self::DEFAULT.clone()
10792    }
10793}
10794impl MessageData for EFI_STATUS_DATA {
10795    type Message = MavMessage;
10796    const ID: u32 = 225u32;
10797    const NAME: &'static str = "EFI_STATUS";
10798    const EXTRA_CRC: u8 = 208u8;
10799    const ENCODED_LEN: usize = 73usize;
10800    fn deser(
10801        _version: MavlinkVersion,
10802        __input: &[u8],
10803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10804        let avail_len = __input.len();
10805        let mut payload_buf = [0; Self::ENCODED_LEN];
10806        let mut buf = if avail_len < Self::ENCODED_LEN {
10807            payload_buf[0..avail_len].copy_from_slice(__input);
10808            Bytes::new(&payload_buf)
10809        } else {
10810            Bytes::new(__input)
10811        };
10812        let mut __struct = Self::default();
10813        __struct.ecu_index = buf.get_f32_le();
10814        __struct.rpm = buf.get_f32_le();
10815        __struct.fuel_consumed = buf.get_f32_le();
10816        __struct.fuel_flow = buf.get_f32_le();
10817        __struct.engine_load = buf.get_f32_le();
10818        __struct.throttle_position = buf.get_f32_le();
10819        __struct.spark_dwell_time = buf.get_f32_le();
10820        __struct.barometric_pressure = buf.get_f32_le();
10821        __struct.intake_manifold_pressure = buf.get_f32_le();
10822        __struct.intake_manifold_temperature = buf.get_f32_le();
10823        __struct.cylinder_head_temperature = buf.get_f32_le();
10824        __struct.ignition_timing = buf.get_f32_le();
10825        __struct.injection_time = buf.get_f32_le();
10826        __struct.exhaust_gas_temperature = buf.get_f32_le();
10827        __struct.throttle_out = buf.get_f32_le();
10828        __struct.pt_compensation = buf.get_f32_le();
10829        __struct.health = buf.get_u8();
10830        __struct.ignition_voltage = buf.get_f32_le();
10831        __struct.fuel_pressure = buf.get_f32_le();
10832        Ok(__struct)
10833    }
10834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10835        let mut __tmp = BytesMut::new(bytes);
10836        #[allow(clippy::absurd_extreme_comparisons)]
10837        #[allow(unused_comparisons)]
10838        if __tmp.remaining() < Self::ENCODED_LEN {
10839            panic!(
10840                "buffer is too small (need {} bytes, but got {})",
10841                Self::ENCODED_LEN,
10842                __tmp.remaining(),
10843            )
10844        }
10845        __tmp.put_f32_le(self.ecu_index);
10846        __tmp.put_f32_le(self.rpm);
10847        __tmp.put_f32_le(self.fuel_consumed);
10848        __tmp.put_f32_le(self.fuel_flow);
10849        __tmp.put_f32_le(self.engine_load);
10850        __tmp.put_f32_le(self.throttle_position);
10851        __tmp.put_f32_le(self.spark_dwell_time);
10852        __tmp.put_f32_le(self.barometric_pressure);
10853        __tmp.put_f32_le(self.intake_manifold_pressure);
10854        __tmp.put_f32_le(self.intake_manifold_temperature);
10855        __tmp.put_f32_le(self.cylinder_head_temperature);
10856        __tmp.put_f32_le(self.ignition_timing);
10857        __tmp.put_f32_le(self.injection_time);
10858        __tmp.put_f32_le(self.exhaust_gas_temperature);
10859        __tmp.put_f32_le(self.throttle_out);
10860        __tmp.put_f32_le(self.pt_compensation);
10861        __tmp.put_u8(self.health);
10862        if matches!(version, MavlinkVersion::V2) {
10863            __tmp.put_f32_le(self.ignition_voltage);
10864            __tmp.put_f32_le(self.fuel_pressure);
10865            let len = __tmp.len();
10866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10867        } else {
10868            __tmp.len()
10869        }
10870    }
10871}
10872#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10873#[doc = ""]
10874#[doc = "ID: 131"]
10875#[derive(Debug, Clone, PartialEq)]
10876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10878#[cfg_attr(feature = "ts", derive(TS))]
10879#[cfg_attr(feature = "ts", ts(export))]
10880pub struct ENCAPSULATED_DATA_DATA {
10881    #[doc = "sequence number (starting with 0 on every transmission)"]
10882    pub seqnr: u16,
10883    #[doc = "image data bytes"]
10884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10885    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10886    pub data: [u8; 253],
10887}
10888impl ENCAPSULATED_DATA_DATA {
10889    pub const ENCODED_LEN: usize = 255usize;
10890    pub const DEFAULT: Self = Self {
10891        seqnr: 0_u16,
10892        data: [0_u8; 253usize],
10893    };
10894    #[cfg(feature = "arbitrary")]
10895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10896        use arbitrary::{Arbitrary, Unstructured};
10897        let mut buf = [0u8; 1024];
10898        rng.fill_bytes(&mut buf);
10899        let mut unstructured = Unstructured::new(&buf);
10900        Self::arbitrary(&mut unstructured).unwrap_or_default()
10901    }
10902}
10903impl Default for ENCAPSULATED_DATA_DATA {
10904    fn default() -> Self {
10905        Self::DEFAULT.clone()
10906    }
10907}
10908impl MessageData for ENCAPSULATED_DATA_DATA {
10909    type Message = MavMessage;
10910    const ID: u32 = 131u32;
10911    const NAME: &'static str = "ENCAPSULATED_DATA";
10912    const EXTRA_CRC: u8 = 223u8;
10913    const ENCODED_LEN: usize = 255usize;
10914    fn deser(
10915        _version: MavlinkVersion,
10916        __input: &[u8],
10917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10918        let avail_len = __input.len();
10919        let mut payload_buf = [0; Self::ENCODED_LEN];
10920        let mut buf = if avail_len < Self::ENCODED_LEN {
10921            payload_buf[0..avail_len].copy_from_slice(__input);
10922            Bytes::new(&payload_buf)
10923        } else {
10924            Bytes::new(__input)
10925        };
10926        let mut __struct = Self::default();
10927        __struct.seqnr = buf.get_u16_le();
10928        for v in &mut __struct.data {
10929            let val = buf.get_u8();
10930            *v = val;
10931        }
10932        Ok(__struct)
10933    }
10934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10935        let mut __tmp = BytesMut::new(bytes);
10936        #[allow(clippy::absurd_extreme_comparisons)]
10937        #[allow(unused_comparisons)]
10938        if __tmp.remaining() < Self::ENCODED_LEN {
10939            panic!(
10940                "buffer is too small (need {} bytes, but got {})",
10941                Self::ENCODED_LEN,
10942                __tmp.remaining(),
10943            )
10944        }
10945        __tmp.put_u16_le(self.seqnr);
10946        for val in &self.data {
10947            __tmp.put_u8(*val);
10948        }
10949        if matches!(version, MavlinkVersion::V2) {
10950            let len = __tmp.len();
10951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10952        } else {
10953            __tmp.len()
10954        }
10955    }
10956}
10957#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10958#[doc = ""]
10959#[doc = "ID: 290"]
10960#[derive(Debug, Clone, PartialEq)]
10961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10963#[cfg_attr(feature = "ts", derive(TS))]
10964#[cfg_attr(feature = "ts", ts(export))]
10965pub struct ESC_INFO_DATA {
10966    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10967    pub time_usec: u64,
10968    #[doc = "Number of reported errors by each ESC since boot."]
10969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10970    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10971    pub error_count: [u32; 4],
10972    #[doc = "Counter of data packets received."]
10973    pub counter: u16,
10974    #[doc = "Bitmap of ESC failure flags."]
10975    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10976    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10977    pub failure_flags: [u16; 4],
10978    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10980    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10981    pub temperature: [i16; 4],
10982    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10983    pub index: u8,
10984    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10985    pub count: u8,
10986    #[doc = "Connection type protocol for all ESC."]
10987    pub connection_type: EscConnectionType,
10988    #[doc = "Information regarding online/offline status of each ESC."]
10989    pub info: u8,
10990}
10991impl ESC_INFO_DATA {
10992    pub const ENCODED_LEN: usize = 46usize;
10993    pub const DEFAULT: Self = Self {
10994        time_usec: 0_u64,
10995        error_count: [0_u32; 4usize],
10996        counter: 0_u16,
10997        failure_flags: [0_u16; 4usize],
10998        temperature: [0_i16; 4usize],
10999        index: 0_u8,
11000        count: 0_u8,
11001        connection_type: EscConnectionType::DEFAULT,
11002        info: 0_u8,
11003    };
11004    #[cfg(feature = "arbitrary")]
11005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11006        use arbitrary::{Arbitrary, Unstructured};
11007        let mut buf = [0u8; 1024];
11008        rng.fill_bytes(&mut buf);
11009        let mut unstructured = Unstructured::new(&buf);
11010        Self::arbitrary(&mut unstructured).unwrap_or_default()
11011    }
11012}
11013impl Default for ESC_INFO_DATA {
11014    fn default() -> Self {
11015        Self::DEFAULT.clone()
11016    }
11017}
11018impl MessageData for ESC_INFO_DATA {
11019    type Message = MavMessage;
11020    const ID: u32 = 290u32;
11021    const NAME: &'static str = "ESC_INFO";
11022    const EXTRA_CRC: u8 = 251u8;
11023    const ENCODED_LEN: usize = 46usize;
11024    fn deser(
11025        _version: MavlinkVersion,
11026        __input: &[u8],
11027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11028        let avail_len = __input.len();
11029        let mut payload_buf = [0; Self::ENCODED_LEN];
11030        let mut buf = if avail_len < Self::ENCODED_LEN {
11031            payload_buf[0..avail_len].copy_from_slice(__input);
11032            Bytes::new(&payload_buf)
11033        } else {
11034            Bytes::new(__input)
11035        };
11036        let mut __struct = Self::default();
11037        __struct.time_usec = buf.get_u64_le();
11038        for v in &mut __struct.error_count {
11039            let val = buf.get_u32_le();
11040            *v = val;
11041        }
11042        __struct.counter = buf.get_u16_le();
11043        for v in &mut __struct.failure_flags {
11044            let val = buf.get_u16_le();
11045            *v = val;
11046        }
11047        for v in &mut __struct.temperature {
11048            let val = buf.get_i16_le();
11049            *v = val;
11050        }
11051        __struct.index = buf.get_u8();
11052        __struct.count = buf.get_u8();
11053        let tmp = buf.get_u8();
11054        __struct.connection_type =
11055            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11056                enum_type: "EscConnectionType",
11057                value: tmp as u64,
11058            })?;
11059        __struct.info = buf.get_u8();
11060        Ok(__struct)
11061    }
11062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11063        let mut __tmp = BytesMut::new(bytes);
11064        #[allow(clippy::absurd_extreme_comparisons)]
11065        #[allow(unused_comparisons)]
11066        if __tmp.remaining() < Self::ENCODED_LEN {
11067            panic!(
11068                "buffer is too small (need {} bytes, but got {})",
11069                Self::ENCODED_LEN,
11070                __tmp.remaining(),
11071            )
11072        }
11073        __tmp.put_u64_le(self.time_usec);
11074        for val in &self.error_count {
11075            __tmp.put_u32_le(*val);
11076        }
11077        __tmp.put_u16_le(self.counter);
11078        for val in &self.failure_flags {
11079            __tmp.put_u16_le(*val);
11080        }
11081        for val in &self.temperature {
11082            __tmp.put_i16_le(*val);
11083        }
11084        __tmp.put_u8(self.index);
11085        __tmp.put_u8(self.count);
11086        __tmp.put_u8(self.connection_type as u8);
11087        __tmp.put_u8(self.info);
11088        if matches!(version, MavlinkVersion::V2) {
11089            let len = __tmp.len();
11090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11091        } else {
11092            __tmp.len()
11093        }
11094    }
11095}
11096#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11097#[doc = ""]
11098#[doc = "ID: 291"]
11099#[derive(Debug, Clone, PartialEq)]
11100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11102#[cfg_attr(feature = "ts", derive(TS))]
11103#[cfg_attr(feature = "ts", ts(export))]
11104pub struct ESC_STATUS_DATA {
11105    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11106    pub time_usec: u64,
11107    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11108    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11109    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11110    pub rpm: [i32; 4],
11111    #[doc = "Voltage measured from each ESC."]
11112    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11113    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11114    pub voltage: [f32; 4],
11115    #[doc = "Current measured from each ESC."]
11116    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11117    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11118    pub current: [f32; 4],
11119    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11120    pub index: u8,
11121}
11122impl ESC_STATUS_DATA {
11123    pub const ENCODED_LEN: usize = 57usize;
11124    pub const DEFAULT: Self = Self {
11125        time_usec: 0_u64,
11126        rpm: [0_i32; 4usize],
11127        voltage: [0.0_f32; 4usize],
11128        current: [0.0_f32; 4usize],
11129        index: 0_u8,
11130    };
11131    #[cfg(feature = "arbitrary")]
11132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11133        use arbitrary::{Arbitrary, Unstructured};
11134        let mut buf = [0u8; 1024];
11135        rng.fill_bytes(&mut buf);
11136        let mut unstructured = Unstructured::new(&buf);
11137        Self::arbitrary(&mut unstructured).unwrap_or_default()
11138    }
11139}
11140impl Default for ESC_STATUS_DATA {
11141    fn default() -> Self {
11142        Self::DEFAULT.clone()
11143    }
11144}
11145impl MessageData for ESC_STATUS_DATA {
11146    type Message = MavMessage;
11147    const ID: u32 = 291u32;
11148    const NAME: &'static str = "ESC_STATUS";
11149    const EXTRA_CRC: u8 = 10u8;
11150    const ENCODED_LEN: usize = 57usize;
11151    fn deser(
11152        _version: MavlinkVersion,
11153        __input: &[u8],
11154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11155        let avail_len = __input.len();
11156        let mut payload_buf = [0; Self::ENCODED_LEN];
11157        let mut buf = if avail_len < Self::ENCODED_LEN {
11158            payload_buf[0..avail_len].copy_from_slice(__input);
11159            Bytes::new(&payload_buf)
11160        } else {
11161            Bytes::new(__input)
11162        };
11163        let mut __struct = Self::default();
11164        __struct.time_usec = buf.get_u64_le();
11165        for v in &mut __struct.rpm {
11166            let val = buf.get_i32_le();
11167            *v = val;
11168        }
11169        for v in &mut __struct.voltage {
11170            let val = buf.get_f32_le();
11171            *v = val;
11172        }
11173        for v in &mut __struct.current {
11174            let val = buf.get_f32_le();
11175            *v = val;
11176        }
11177        __struct.index = buf.get_u8();
11178        Ok(__struct)
11179    }
11180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11181        let mut __tmp = BytesMut::new(bytes);
11182        #[allow(clippy::absurd_extreme_comparisons)]
11183        #[allow(unused_comparisons)]
11184        if __tmp.remaining() < Self::ENCODED_LEN {
11185            panic!(
11186                "buffer is too small (need {} bytes, but got {})",
11187                Self::ENCODED_LEN,
11188                __tmp.remaining(),
11189            )
11190        }
11191        __tmp.put_u64_le(self.time_usec);
11192        for val in &self.rpm {
11193            __tmp.put_i32_le(*val);
11194        }
11195        for val in &self.voltage {
11196            __tmp.put_f32_le(*val);
11197        }
11198        for val in &self.current {
11199            __tmp.put_f32_le(*val);
11200        }
11201        __tmp.put_u8(self.index);
11202        if matches!(version, MavlinkVersion::V2) {
11203            let len = __tmp.len();
11204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11205        } else {
11206            __tmp.len()
11207        }
11208    }
11209}
11210#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11211#[doc = ""]
11212#[doc = "ID: 230"]
11213#[derive(Debug, Clone, PartialEq)]
11214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11216#[cfg_attr(feature = "ts", derive(TS))]
11217#[cfg_attr(feature = "ts", ts(export))]
11218pub struct ESTIMATOR_STATUS_DATA {
11219    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11220    pub time_usec: u64,
11221    #[doc = "Velocity innovation test ratio"]
11222    pub vel_ratio: f32,
11223    #[doc = "Horizontal position innovation test ratio"]
11224    pub pos_horiz_ratio: f32,
11225    #[doc = "Vertical position innovation test ratio"]
11226    pub pos_vert_ratio: f32,
11227    #[doc = "Magnetometer innovation test ratio"]
11228    pub mag_ratio: f32,
11229    #[doc = "Height above terrain innovation test ratio"]
11230    pub hagl_ratio: f32,
11231    #[doc = "True airspeed innovation test ratio"]
11232    pub tas_ratio: f32,
11233    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11234    pub pos_horiz_accuracy: f32,
11235    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11236    pub pos_vert_accuracy: f32,
11237    #[doc = "Bitmap indicating which EKF outputs are valid."]
11238    pub flags: EstimatorStatusFlags,
11239}
11240impl ESTIMATOR_STATUS_DATA {
11241    pub const ENCODED_LEN: usize = 42usize;
11242    pub const DEFAULT: Self = Self {
11243        time_usec: 0_u64,
11244        vel_ratio: 0.0_f32,
11245        pos_horiz_ratio: 0.0_f32,
11246        pos_vert_ratio: 0.0_f32,
11247        mag_ratio: 0.0_f32,
11248        hagl_ratio: 0.0_f32,
11249        tas_ratio: 0.0_f32,
11250        pos_horiz_accuracy: 0.0_f32,
11251        pos_vert_accuracy: 0.0_f32,
11252        flags: EstimatorStatusFlags::DEFAULT,
11253    };
11254    #[cfg(feature = "arbitrary")]
11255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11256        use arbitrary::{Arbitrary, Unstructured};
11257        let mut buf = [0u8; 1024];
11258        rng.fill_bytes(&mut buf);
11259        let mut unstructured = Unstructured::new(&buf);
11260        Self::arbitrary(&mut unstructured).unwrap_or_default()
11261    }
11262}
11263impl Default for ESTIMATOR_STATUS_DATA {
11264    fn default() -> Self {
11265        Self::DEFAULT.clone()
11266    }
11267}
11268impl MessageData for ESTIMATOR_STATUS_DATA {
11269    type Message = MavMessage;
11270    const ID: u32 = 230u32;
11271    const NAME: &'static str = "ESTIMATOR_STATUS";
11272    const EXTRA_CRC: u8 = 163u8;
11273    const ENCODED_LEN: usize = 42usize;
11274    fn deser(
11275        _version: MavlinkVersion,
11276        __input: &[u8],
11277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11278        let avail_len = __input.len();
11279        let mut payload_buf = [0; Self::ENCODED_LEN];
11280        let mut buf = if avail_len < Self::ENCODED_LEN {
11281            payload_buf[0..avail_len].copy_from_slice(__input);
11282            Bytes::new(&payload_buf)
11283        } else {
11284            Bytes::new(__input)
11285        };
11286        let mut __struct = Self::default();
11287        __struct.time_usec = buf.get_u64_le();
11288        __struct.vel_ratio = buf.get_f32_le();
11289        __struct.pos_horiz_ratio = buf.get_f32_le();
11290        __struct.pos_vert_ratio = buf.get_f32_le();
11291        __struct.mag_ratio = buf.get_f32_le();
11292        __struct.hagl_ratio = buf.get_f32_le();
11293        __struct.tas_ratio = buf.get_f32_le();
11294        __struct.pos_horiz_accuracy = buf.get_f32_le();
11295        __struct.pos_vert_accuracy = buf.get_f32_le();
11296        let tmp = buf.get_u16_le();
11297        __struct.flags = EstimatorStatusFlags::from_bits(
11298            tmp as <EstimatorStatusFlags as Flags>::Bits,
11299        )
11300        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11301            flag_type: "EstimatorStatusFlags",
11302            value: tmp as u64,
11303        })?;
11304        Ok(__struct)
11305    }
11306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11307        let mut __tmp = BytesMut::new(bytes);
11308        #[allow(clippy::absurd_extreme_comparisons)]
11309        #[allow(unused_comparisons)]
11310        if __tmp.remaining() < Self::ENCODED_LEN {
11311            panic!(
11312                "buffer is too small (need {} bytes, but got {})",
11313                Self::ENCODED_LEN,
11314                __tmp.remaining(),
11315            )
11316        }
11317        __tmp.put_u64_le(self.time_usec);
11318        __tmp.put_f32_le(self.vel_ratio);
11319        __tmp.put_f32_le(self.pos_horiz_ratio);
11320        __tmp.put_f32_le(self.pos_vert_ratio);
11321        __tmp.put_f32_le(self.mag_ratio);
11322        __tmp.put_f32_le(self.hagl_ratio);
11323        __tmp.put_f32_le(self.tas_ratio);
11324        __tmp.put_f32_le(self.pos_horiz_accuracy);
11325        __tmp.put_f32_le(self.pos_vert_accuracy);
11326        __tmp.put_u16_le(self.flags.bits() as u16);
11327        if matches!(version, MavlinkVersion::V2) {
11328            let len = __tmp.len();
11329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11330        } else {
11331            __tmp.len()
11332        }
11333    }
11334}
11335#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11336#[doc = ""]
11337#[doc = "ID: 410"]
11338#[derive(Debug, Clone, PartialEq)]
11339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11341#[cfg_attr(feature = "ts", derive(TS))]
11342#[cfg_attr(feature = "ts", ts(export))]
11343pub struct EVENT_DATA {
11344    #[doc = "Event ID (as defined in the component metadata)"]
11345    pub id: u32,
11346    #[doc = "Timestamp (time since system boot when the event happened)."]
11347    pub event_time_boot_ms: u32,
11348    #[doc = "Sequence number."]
11349    pub sequence: u16,
11350    #[doc = "Component ID"]
11351    pub destination_component: u8,
11352    #[doc = "System ID"]
11353    pub destination_system: u8,
11354    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11355    pub log_levels: u8,
11356    #[doc = "Arguments (depend on event ID)."]
11357    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11358    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11359    pub arguments: [u8; 40],
11360}
11361impl EVENT_DATA {
11362    pub const ENCODED_LEN: usize = 53usize;
11363    pub const DEFAULT: Self = Self {
11364        id: 0_u32,
11365        event_time_boot_ms: 0_u32,
11366        sequence: 0_u16,
11367        destination_component: 0_u8,
11368        destination_system: 0_u8,
11369        log_levels: 0_u8,
11370        arguments: [0_u8; 40usize],
11371    };
11372    #[cfg(feature = "arbitrary")]
11373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11374        use arbitrary::{Arbitrary, Unstructured};
11375        let mut buf = [0u8; 1024];
11376        rng.fill_bytes(&mut buf);
11377        let mut unstructured = Unstructured::new(&buf);
11378        Self::arbitrary(&mut unstructured).unwrap_or_default()
11379    }
11380}
11381impl Default for EVENT_DATA {
11382    fn default() -> Self {
11383        Self::DEFAULT.clone()
11384    }
11385}
11386impl MessageData for EVENT_DATA {
11387    type Message = MavMessage;
11388    const ID: u32 = 410u32;
11389    const NAME: &'static str = "EVENT";
11390    const EXTRA_CRC: u8 = 160u8;
11391    const ENCODED_LEN: usize = 53usize;
11392    fn deser(
11393        _version: MavlinkVersion,
11394        __input: &[u8],
11395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11396        let avail_len = __input.len();
11397        let mut payload_buf = [0; Self::ENCODED_LEN];
11398        let mut buf = if avail_len < Self::ENCODED_LEN {
11399            payload_buf[0..avail_len].copy_from_slice(__input);
11400            Bytes::new(&payload_buf)
11401        } else {
11402            Bytes::new(__input)
11403        };
11404        let mut __struct = Self::default();
11405        __struct.id = buf.get_u32_le();
11406        __struct.event_time_boot_ms = buf.get_u32_le();
11407        __struct.sequence = buf.get_u16_le();
11408        __struct.destination_component = buf.get_u8();
11409        __struct.destination_system = buf.get_u8();
11410        __struct.log_levels = buf.get_u8();
11411        for v in &mut __struct.arguments {
11412            let val = buf.get_u8();
11413            *v = val;
11414        }
11415        Ok(__struct)
11416    }
11417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11418        let mut __tmp = BytesMut::new(bytes);
11419        #[allow(clippy::absurd_extreme_comparisons)]
11420        #[allow(unused_comparisons)]
11421        if __tmp.remaining() < Self::ENCODED_LEN {
11422            panic!(
11423                "buffer is too small (need {} bytes, but got {})",
11424                Self::ENCODED_LEN,
11425                __tmp.remaining(),
11426            )
11427        }
11428        __tmp.put_u32_le(self.id);
11429        __tmp.put_u32_le(self.event_time_boot_ms);
11430        __tmp.put_u16_le(self.sequence);
11431        __tmp.put_u8(self.destination_component);
11432        __tmp.put_u8(self.destination_system);
11433        __tmp.put_u8(self.log_levels);
11434        for val in &self.arguments {
11435            __tmp.put_u8(*val);
11436        }
11437        if matches!(version, MavlinkVersion::V2) {
11438            let len = __tmp.len();
11439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11440        } else {
11441            __tmp.len()
11442        }
11443    }
11444}
11445#[doc = "Provides state for additional features."]
11446#[doc = ""]
11447#[doc = "ID: 245"]
11448#[derive(Debug, Clone, PartialEq)]
11449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11451#[cfg_attr(feature = "ts", derive(TS))]
11452#[cfg_attr(feature = "ts", ts(export))]
11453pub struct EXTENDED_SYS_STATE_DATA {
11454    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11455    pub vtol_state: MavVtolState,
11456    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11457    pub landed_state: MavLandedState,
11458}
11459impl EXTENDED_SYS_STATE_DATA {
11460    pub const ENCODED_LEN: usize = 2usize;
11461    pub const DEFAULT: Self = Self {
11462        vtol_state: MavVtolState::DEFAULT,
11463        landed_state: MavLandedState::DEFAULT,
11464    };
11465    #[cfg(feature = "arbitrary")]
11466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11467        use arbitrary::{Arbitrary, Unstructured};
11468        let mut buf = [0u8; 1024];
11469        rng.fill_bytes(&mut buf);
11470        let mut unstructured = Unstructured::new(&buf);
11471        Self::arbitrary(&mut unstructured).unwrap_or_default()
11472    }
11473}
11474impl Default for EXTENDED_SYS_STATE_DATA {
11475    fn default() -> Self {
11476        Self::DEFAULT.clone()
11477    }
11478}
11479impl MessageData for EXTENDED_SYS_STATE_DATA {
11480    type Message = MavMessage;
11481    const ID: u32 = 245u32;
11482    const NAME: &'static str = "EXTENDED_SYS_STATE";
11483    const EXTRA_CRC: u8 = 130u8;
11484    const ENCODED_LEN: usize = 2usize;
11485    fn deser(
11486        _version: MavlinkVersion,
11487        __input: &[u8],
11488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11489        let avail_len = __input.len();
11490        let mut payload_buf = [0; Self::ENCODED_LEN];
11491        let mut buf = if avail_len < Self::ENCODED_LEN {
11492            payload_buf[0..avail_len].copy_from_slice(__input);
11493            Bytes::new(&payload_buf)
11494        } else {
11495            Bytes::new(__input)
11496        };
11497        let mut __struct = Self::default();
11498        let tmp = buf.get_u8();
11499        __struct.vtol_state =
11500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11501                enum_type: "MavVtolState",
11502                value: tmp as u64,
11503            })?;
11504        let tmp = buf.get_u8();
11505        __struct.landed_state =
11506            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11507                enum_type: "MavLandedState",
11508                value: tmp as u64,
11509            })?;
11510        Ok(__struct)
11511    }
11512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11513        let mut __tmp = BytesMut::new(bytes);
11514        #[allow(clippy::absurd_extreme_comparisons)]
11515        #[allow(unused_comparisons)]
11516        if __tmp.remaining() < Self::ENCODED_LEN {
11517            panic!(
11518                "buffer is too small (need {} bytes, but got {})",
11519                Self::ENCODED_LEN,
11520                __tmp.remaining(),
11521            )
11522        }
11523        __tmp.put_u8(self.vtol_state as u8);
11524        __tmp.put_u8(self.landed_state as u8);
11525        if matches!(version, MavlinkVersion::V2) {
11526            let len = __tmp.len();
11527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11528        } else {
11529            __tmp.len()
11530        }
11531    }
11532}
11533#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11534#[doc = ""]
11535#[doc = "ID: 162"]
11536#[derive(Debug, Clone, PartialEq)]
11537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11539#[cfg_attr(feature = "ts", derive(TS))]
11540#[cfg_attr(feature = "ts", ts(export))]
11541pub struct FENCE_STATUS_DATA {
11542    #[doc = "Time (since boot) of last breach."]
11543    pub breach_time: u32,
11544    #[doc = "Number of fence breaches."]
11545    pub breach_count: u16,
11546    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11547    pub breach_status: u8,
11548    #[doc = "Last breach type."]
11549    pub breach_type: FenceBreach,
11550    #[doc = "Active action to prevent fence breach"]
11551    #[cfg_attr(feature = "serde", serde(default))]
11552    pub breach_mitigation: FenceMitigate,
11553}
11554impl FENCE_STATUS_DATA {
11555    pub const ENCODED_LEN: usize = 9usize;
11556    pub const DEFAULT: Self = Self {
11557        breach_time: 0_u32,
11558        breach_count: 0_u16,
11559        breach_status: 0_u8,
11560        breach_type: FenceBreach::DEFAULT,
11561        breach_mitigation: FenceMitigate::DEFAULT,
11562    };
11563    #[cfg(feature = "arbitrary")]
11564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11565        use arbitrary::{Arbitrary, Unstructured};
11566        let mut buf = [0u8; 1024];
11567        rng.fill_bytes(&mut buf);
11568        let mut unstructured = Unstructured::new(&buf);
11569        Self::arbitrary(&mut unstructured).unwrap_or_default()
11570    }
11571}
11572impl Default for FENCE_STATUS_DATA {
11573    fn default() -> Self {
11574        Self::DEFAULT.clone()
11575    }
11576}
11577impl MessageData for FENCE_STATUS_DATA {
11578    type Message = MavMessage;
11579    const ID: u32 = 162u32;
11580    const NAME: &'static str = "FENCE_STATUS";
11581    const EXTRA_CRC: u8 = 189u8;
11582    const ENCODED_LEN: usize = 9usize;
11583    fn deser(
11584        _version: MavlinkVersion,
11585        __input: &[u8],
11586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11587        let avail_len = __input.len();
11588        let mut payload_buf = [0; Self::ENCODED_LEN];
11589        let mut buf = if avail_len < Self::ENCODED_LEN {
11590            payload_buf[0..avail_len].copy_from_slice(__input);
11591            Bytes::new(&payload_buf)
11592        } else {
11593            Bytes::new(__input)
11594        };
11595        let mut __struct = Self::default();
11596        __struct.breach_time = buf.get_u32_le();
11597        __struct.breach_count = buf.get_u16_le();
11598        __struct.breach_status = buf.get_u8();
11599        let tmp = buf.get_u8();
11600        __struct.breach_type =
11601            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11602                enum_type: "FenceBreach",
11603                value: tmp as u64,
11604            })?;
11605        let tmp = buf.get_u8();
11606        __struct.breach_mitigation =
11607            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11608                enum_type: "FenceMitigate",
11609                value: tmp as u64,
11610            })?;
11611        Ok(__struct)
11612    }
11613    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11614        let mut __tmp = BytesMut::new(bytes);
11615        #[allow(clippy::absurd_extreme_comparisons)]
11616        #[allow(unused_comparisons)]
11617        if __tmp.remaining() < Self::ENCODED_LEN {
11618            panic!(
11619                "buffer is too small (need {} bytes, but got {})",
11620                Self::ENCODED_LEN,
11621                __tmp.remaining(),
11622            )
11623        }
11624        __tmp.put_u32_le(self.breach_time);
11625        __tmp.put_u16_le(self.breach_count);
11626        __tmp.put_u8(self.breach_status);
11627        __tmp.put_u8(self.breach_type as u8);
11628        if matches!(version, MavlinkVersion::V2) {
11629            __tmp.put_u8(self.breach_mitigation as u8);
11630            let len = __tmp.len();
11631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11632        } else {
11633            __tmp.len()
11634        }
11635    }
11636}
11637#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11638#[doc = ""]
11639#[doc = "ID: 110"]
11640#[derive(Debug, Clone, PartialEq)]
11641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11643#[cfg_attr(feature = "ts", derive(TS))]
11644#[cfg_attr(feature = "ts", ts(export))]
11645pub struct FILE_TRANSFER_PROTOCOL_DATA {
11646    #[doc = "Network ID (0 for broadcast)"]
11647    pub target_network: u8,
11648    #[doc = "System ID (0 for broadcast)"]
11649    pub target_system: u8,
11650    #[doc = "Component ID (0 for broadcast)"]
11651    pub target_component: u8,
11652    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11654    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11655    pub payload: [u8; 251],
11656}
11657impl FILE_TRANSFER_PROTOCOL_DATA {
11658    pub const ENCODED_LEN: usize = 254usize;
11659    pub const DEFAULT: Self = Self {
11660        target_network: 0_u8,
11661        target_system: 0_u8,
11662        target_component: 0_u8,
11663        payload: [0_u8; 251usize],
11664    };
11665    #[cfg(feature = "arbitrary")]
11666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11667        use arbitrary::{Arbitrary, Unstructured};
11668        let mut buf = [0u8; 1024];
11669        rng.fill_bytes(&mut buf);
11670        let mut unstructured = Unstructured::new(&buf);
11671        Self::arbitrary(&mut unstructured).unwrap_or_default()
11672    }
11673}
11674impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11675    fn default() -> Self {
11676        Self::DEFAULT.clone()
11677    }
11678}
11679impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11680    type Message = MavMessage;
11681    const ID: u32 = 110u32;
11682    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11683    const EXTRA_CRC: u8 = 84u8;
11684    const ENCODED_LEN: usize = 254usize;
11685    fn deser(
11686        _version: MavlinkVersion,
11687        __input: &[u8],
11688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11689        let avail_len = __input.len();
11690        let mut payload_buf = [0; Self::ENCODED_LEN];
11691        let mut buf = if avail_len < Self::ENCODED_LEN {
11692            payload_buf[0..avail_len].copy_from_slice(__input);
11693            Bytes::new(&payload_buf)
11694        } else {
11695            Bytes::new(__input)
11696        };
11697        let mut __struct = Self::default();
11698        __struct.target_network = buf.get_u8();
11699        __struct.target_system = buf.get_u8();
11700        __struct.target_component = buf.get_u8();
11701        for v in &mut __struct.payload {
11702            let val = buf.get_u8();
11703            *v = val;
11704        }
11705        Ok(__struct)
11706    }
11707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11708        let mut __tmp = BytesMut::new(bytes);
11709        #[allow(clippy::absurd_extreme_comparisons)]
11710        #[allow(unused_comparisons)]
11711        if __tmp.remaining() < Self::ENCODED_LEN {
11712            panic!(
11713                "buffer is too small (need {} bytes, but got {})",
11714                Self::ENCODED_LEN,
11715                __tmp.remaining(),
11716            )
11717        }
11718        __tmp.put_u8(self.target_network);
11719        __tmp.put_u8(self.target_system);
11720        __tmp.put_u8(self.target_component);
11721        for val in &self.payload {
11722            __tmp.put_u8(*val);
11723        }
11724        if matches!(version, MavlinkVersion::V2) {
11725            let len = __tmp.len();
11726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11727        } else {
11728            __tmp.len()
11729        }
11730    }
11731}
11732#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11733#[doc = ""]
11734#[doc = "ID: 264"]
11735#[derive(Debug, Clone, PartialEq)]
11736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11738#[cfg_attr(feature = "ts", derive(TS))]
11739#[cfg_attr(feature = "ts", ts(export))]
11740pub struct FLIGHT_INFORMATION_DATA {
11741    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11742    pub arming_time_utc: u64,
11743    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11744    pub takeoff_time_utc: u64,
11745    #[doc = "Flight number. Note, field is misnamed UUID."]
11746    pub flight_uuid: u64,
11747    #[doc = "Timestamp (time since system boot)."]
11748    pub time_boot_ms: u32,
11749    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11750    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11751    pub landing_time: u32,
11752}
11753impl FLIGHT_INFORMATION_DATA {
11754    pub const ENCODED_LEN: usize = 32usize;
11755    pub const DEFAULT: Self = Self {
11756        arming_time_utc: 0_u64,
11757        takeoff_time_utc: 0_u64,
11758        flight_uuid: 0_u64,
11759        time_boot_ms: 0_u32,
11760        landing_time: 0_u32,
11761    };
11762    #[cfg(feature = "arbitrary")]
11763    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11764        use arbitrary::{Arbitrary, Unstructured};
11765        let mut buf = [0u8; 1024];
11766        rng.fill_bytes(&mut buf);
11767        let mut unstructured = Unstructured::new(&buf);
11768        Self::arbitrary(&mut unstructured).unwrap_or_default()
11769    }
11770}
11771impl Default for FLIGHT_INFORMATION_DATA {
11772    fn default() -> Self {
11773        Self::DEFAULT.clone()
11774    }
11775}
11776impl MessageData for FLIGHT_INFORMATION_DATA {
11777    type Message = MavMessage;
11778    const ID: u32 = 264u32;
11779    const NAME: &'static str = "FLIGHT_INFORMATION";
11780    const EXTRA_CRC: u8 = 49u8;
11781    const ENCODED_LEN: usize = 32usize;
11782    fn deser(
11783        _version: MavlinkVersion,
11784        __input: &[u8],
11785    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11786        let avail_len = __input.len();
11787        let mut payload_buf = [0; Self::ENCODED_LEN];
11788        let mut buf = if avail_len < Self::ENCODED_LEN {
11789            payload_buf[0..avail_len].copy_from_slice(__input);
11790            Bytes::new(&payload_buf)
11791        } else {
11792            Bytes::new(__input)
11793        };
11794        let mut __struct = Self::default();
11795        __struct.arming_time_utc = buf.get_u64_le();
11796        __struct.takeoff_time_utc = buf.get_u64_le();
11797        __struct.flight_uuid = buf.get_u64_le();
11798        __struct.time_boot_ms = buf.get_u32_le();
11799        __struct.landing_time = buf.get_u32_le();
11800        Ok(__struct)
11801    }
11802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11803        let mut __tmp = BytesMut::new(bytes);
11804        #[allow(clippy::absurd_extreme_comparisons)]
11805        #[allow(unused_comparisons)]
11806        if __tmp.remaining() < Self::ENCODED_LEN {
11807            panic!(
11808                "buffer is too small (need {} bytes, but got {})",
11809                Self::ENCODED_LEN,
11810                __tmp.remaining(),
11811            )
11812        }
11813        __tmp.put_u64_le(self.arming_time_utc);
11814        __tmp.put_u64_le(self.takeoff_time_utc);
11815        __tmp.put_u64_le(self.flight_uuid);
11816        __tmp.put_u32_le(self.time_boot_ms);
11817        if matches!(version, MavlinkVersion::V2) {
11818            __tmp.put_u32_le(self.landing_time);
11819            let len = __tmp.len();
11820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11821        } else {
11822            __tmp.len()
11823        }
11824    }
11825}
11826#[doc = "Current motion information from a designated system."]
11827#[doc = ""]
11828#[doc = "ID: 144"]
11829#[derive(Debug, Clone, PartialEq)]
11830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11832#[cfg_attr(feature = "ts", derive(TS))]
11833#[cfg_attr(feature = "ts", ts(export))]
11834pub struct FOLLOW_TARGET_DATA {
11835    #[doc = "Timestamp (time since system boot)."]
11836    pub timestamp: u64,
11837    #[doc = "button states or switches of a tracker device"]
11838    pub custom_state: u64,
11839    #[doc = "Latitude (WGS84)"]
11840    pub lat: i32,
11841    #[doc = "Longitude (WGS84)"]
11842    pub lon: i32,
11843    #[doc = "Altitude (MSL)"]
11844    pub alt: f32,
11845    #[doc = "target velocity (0,0,0) for unknown"]
11846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11848    pub vel: [f32; 3],
11849    #[doc = "linear target acceleration (0,0,0) for unknown"]
11850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11851    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11852    pub acc: [f32; 3],
11853    #[doc = "(0 0 0 0 for unknown)"]
11854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11855    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11856    pub attitude_q: [f32; 4],
11857    #[doc = "(0 0 0 for unknown)"]
11858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11859    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11860    pub rates: [f32; 3],
11861    #[doc = "eph epv"]
11862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11863    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11864    pub position_cov: [f32; 3],
11865    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11866    pub est_capabilities: u8,
11867}
11868impl FOLLOW_TARGET_DATA {
11869    pub const ENCODED_LEN: usize = 93usize;
11870    pub const DEFAULT: Self = Self {
11871        timestamp: 0_u64,
11872        custom_state: 0_u64,
11873        lat: 0_i32,
11874        lon: 0_i32,
11875        alt: 0.0_f32,
11876        vel: [0.0_f32; 3usize],
11877        acc: [0.0_f32; 3usize],
11878        attitude_q: [0.0_f32; 4usize],
11879        rates: [0.0_f32; 3usize],
11880        position_cov: [0.0_f32; 3usize],
11881        est_capabilities: 0_u8,
11882    };
11883    #[cfg(feature = "arbitrary")]
11884    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11885        use arbitrary::{Arbitrary, Unstructured};
11886        let mut buf = [0u8; 1024];
11887        rng.fill_bytes(&mut buf);
11888        let mut unstructured = Unstructured::new(&buf);
11889        Self::arbitrary(&mut unstructured).unwrap_or_default()
11890    }
11891}
11892impl Default for FOLLOW_TARGET_DATA {
11893    fn default() -> Self {
11894        Self::DEFAULT.clone()
11895    }
11896}
11897impl MessageData for FOLLOW_TARGET_DATA {
11898    type Message = MavMessage;
11899    const ID: u32 = 144u32;
11900    const NAME: &'static str = "FOLLOW_TARGET";
11901    const EXTRA_CRC: u8 = 127u8;
11902    const ENCODED_LEN: usize = 93usize;
11903    fn deser(
11904        _version: MavlinkVersion,
11905        __input: &[u8],
11906    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11907        let avail_len = __input.len();
11908        let mut payload_buf = [0; Self::ENCODED_LEN];
11909        let mut buf = if avail_len < Self::ENCODED_LEN {
11910            payload_buf[0..avail_len].copy_from_slice(__input);
11911            Bytes::new(&payload_buf)
11912        } else {
11913            Bytes::new(__input)
11914        };
11915        let mut __struct = Self::default();
11916        __struct.timestamp = buf.get_u64_le();
11917        __struct.custom_state = buf.get_u64_le();
11918        __struct.lat = buf.get_i32_le();
11919        __struct.lon = buf.get_i32_le();
11920        __struct.alt = buf.get_f32_le();
11921        for v in &mut __struct.vel {
11922            let val = buf.get_f32_le();
11923            *v = val;
11924        }
11925        for v in &mut __struct.acc {
11926            let val = buf.get_f32_le();
11927            *v = val;
11928        }
11929        for v in &mut __struct.attitude_q {
11930            let val = buf.get_f32_le();
11931            *v = val;
11932        }
11933        for v in &mut __struct.rates {
11934            let val = buf.get_f32_le();
11935            *v = val;
11936        }
11937        for v in &mut __struct.position_cov {
11938            let val = buf.get_f32_le();
11939            *v = val;
11940        }
11941        __struct.est_capabilities = buf.get_u8();
11942        Ok(__struct)
11943    }
11944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11945        let mut __tmp = BytesMut::new(bytes);
11946        #[allow(clippy::absurd_extreme_comparisons)]
11947        #[allow(unused_comparisons)]
11948        if __tmp.remaining() < Self::ENCODED_LEN {
11949            panic!(
11950                "buffer is too small (need {} bytes, but got {})",
11951                Self::ENCODED_LEN,
11952                __tmp.remaining(),
11953            )
11954        }
11955        __tmp.put_u64_le(self.timestamp);
11956        __tmp.put_u64_le(self.custom_state);
11957        __tmp.put_i32_le(self.lat);
11958        __tmp.put_i32_le(self.lon);
11959        __tmp.put_f32_le(self.alt);
11960        for val in &self.vel {
11961            __tmp.put_f32_le(*val);
11962        }
11963        for val in &self.acc {
11964            __tmp.put_f32_le(*val);
11965        }
11966        for val in &self.attitude_q {
11967            __tmp.put_f32_le(*val);
11968        }
11969        for val in &self.rates {
11970            __tmp.put_f32_le(*val);
11971        }
11972        for val in &self.position_cov {
11973            __tmp.put_f32_le(*val);
11974        }
11975        __tmp.put_u8(self.est_capabilities);
11976        if matches!(version, MavlinkVersion::V2) {
11977            let len = __tmp.len();
11978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11979        } else {
11980            __tmp.len()
11981        }
11982    }
11983}
11984#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11985#[doc = ""]
11986#[doc = "ID: 371"]
11987#[derive(Debug, Clone, PartialEq)]
11988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11990#[cfg_attr(feature = "ts", derive(TS))]
11991#[cfg_attr(feature = "ts", ts(export))]
11992pub struct FUEL_STATUS_DATA {
11993    #[doc = "Capacity when full. Must be provided."]
11994    pub maximum_fuel: f32,
11995    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11996    pub consumed_fuel: f32,
11997    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11998    pub remaining_fuel: f32,
11999    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12000    pub flow_rate: f32,
12001    #[doc = "Fuel temperature. NaN: field not provided."]
12002    pub temperature: f32,
12003    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12004    pub fuel_type: MavFuelType,
12005    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12006    pub id: u8,
12007    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12008    pub percent_remaining: u8,
12009}
12010impl FUEL_STATUS_DATA {
12011    pub const ENCODED_LEN: usize = 26usize;
12012    pub const DEFAULT: Self = Self {
12013        maximum_fuel: 0.0_f32,
12014        consumed_fuel: 0.0_f32,
12015        remaining_fuel: 0.0_f32,
12016        flow_rate: 0.0_f32,
12017        temperature: 0.0_f32,
12018        fuel_type: MavFuelType::DEFAULT,
12019        id: 0_u8,
12020        percent_remaining: 0_u8,
12021    };
12022    #[cfg(feature = "arbitrary")]
12023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12024        use arbitrary::{Arbitrary, Unstructured};
12025        let mut buf = [0u8; 1024];
12026        rng.fill_bytes(&mut buf);
12027        let mut unstructured = Unstructured::new(&buf);
12028        Self::arbitrary(&mut unstructured).unwrap_or_default()
12029    }
12030}
12031impl Default for FUEL_STATUS_DATA {
12032    fn default() -> Self {
12033        Self::DEFAULT.clone()
12034    }
12035}
12036impl MessageData for FUEL_STATUS_DATA {
12037    type Message = MavMessage;
12038    const ID: u32 = 371u32;
12039    const NAME: &'static str = "FUEL_STATUS";
12040    const EXTRA_CRC: u8 = 10u8;
12041    const ENCODED_LEN: usize = 26usize;
12042    fn deser(
12043        _version: MavlinkVersion,
12044        __input: &[u8],
12045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12046        let avail_len = __input.len();
12047        let mut payload_buf = [0; Self::ENCODED_LEN];
12048        let mut buf = if avail_len < Self::ENCODED_LEN {
12049            payload_buf[0..avail_len].copy_from_slice(__input);
12050            Bytes::new(&payload_buf)
12051        } else {
12052            Bytes::new(__input)
12053        };
12054        let mut __struct = Self::default();
12055        __struct.maximum_fuel = buf.get_f32_le();
12056        __struct.consumed_fuel = buf.get_f32_le();
12057        __struct.remaining_fuel = buf.get_f32_le();
12058        __struct.flow_rate = buf.get_f32_le();
12059        __struct.temperature = buf.get_f32_le();
12060        let tmp = buf.get_u32_le();
12061        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12062            ::mavlink_core::error::ParserError::InvalidEnum {
12063                enum_type: "MavFuelType",
12064                value: tmp as u64,
12065            },
12066        )?;
12067        __struct.id = buf.get_u8();
12068        __struct.percent_remaining = buf.get_u8();
12069        Ok(__struct)
12070    }
12071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12072        let mut __tmp = BytesMut::new(bytes);
12073        #[allow(clippy::absurd_extreme_comparisons)]
12074        #[allow(unused_comparisons)]
12075        if __tmp.remaining() < Self::ENCODED_LEN {
12076            panic!(
12077                "buffer is too small (need {} bytes, but got {})",
12078                Self::ENCODED_LEN,
12079                __tmp.remaining(),
12080            )
12081        }
12082        __tmp.put_f32_le(self.maximum_fuel);
12083        __tmp.put_f32_le(self.consumed_fuel);
12084        __tmp.put_f32_le(self.remaining_fuel);
12085        __tmp.put_f32_le(self.flow_rate);
12086        __tmp.put_f32_le(self.temperature);
12087        __tmp.put_u32_le(self.fuel_type as u32);
12088        __tmp.put_u8(self.id);
12089        __tmp.put_u8(self.percent_remaining);
12090        if matches!(version, MavlinkVersion::V2) {
12091            let len = __tmp.len();
12092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12093        } else {
12094            __tmp.len()
12095        }
12096    }
12097}
12098#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12099#[doc = ""]
12100#[doc = "ID: 373"]
12101#[derive(Debug, Clone, PartialEq)]
12102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12104#[cfg_attr(feature = "ts", derive(TS))]
12105#[cfg_attr(feature = "ts", ts(export))]
12106pub struct GENERATOR_STATUS_DATA {
12107    #[doc = "Status flags."]
12108    pub status: MavGeneratorStatusFlag,
12109    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12110    pub battery_current: f32,
12111    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12112    pub load_current: f32,
12113    #[doc = "The power being generated. NaN: field not provided"]
12114    pub power_generated: f32,
12115    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12116    pub bus_voltage: f32,
12117    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12118    pub bat_current_setpoint: f32,
12119    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12120    pub runtime: u32,
12121    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12122    pub time_until_maintenance: i32,
12123    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12124    pub generator_speed: u16,
12125    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12126    pub rectifier_temperature: i16,
12127    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12128    pub generator_temperature: i16,
12129}
12130impl GENERATOR_STATUS_DATA {
12131    pub const ENCODED_LEN: usize = 42usize;
12132    pub const DEFAULT: Self = Self {
12133        status: MavGeneratorStatusFlag::DEFAULT,
12134        battery_current: 0.0_f32,
12135        load_current: 0.0_f32,
12136        power_generated: 0.0_f32,
12137        bus_voltage: 0.0_f32,
12138        bat_current_setpoint: 0.0_f32,
12139        runtime: 0_u32,
12140        time_until_maintenance: 0_i32,
12141        generator_speed: 0_u16,
12142        rectifier_temperature: 0_i16,
12143        generator_temperature: 0_i16,
12144    };
12145    #[cfg(feature = "arbitrary")]
12146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12147        use arbitrary::{Arbitrary, Unstructured};
12148        let mut buf = [0u8; 1024];
12149        rng.fill_bytes(&mut buf);
12150        let mut unstructured = Unstructured::new(&buf);
12151        Self::arbitrary(&mut unstructured).unwrap_or_default()
12152    }
12153}
12154impl Default for GENERATOR_STATUS_DATA {
12155    fn default() -> Self {
12156        Self::DEFAULT.clone()
12157    }
12158}
12159impl MessageData for GENERATOR_STATUS_DATA {
12160    type Message = MavMessage;
12161    const ID: u32 = 373u32;
12162    const NAME: &'static str = "GENERATOR_STATUS";
12163    const EXTRA_CRC: u8 = 117u8;
12164    const ENCODED_LEN: usize = 42usize;
12165    fn deser(
12166        _version: MavlinkVersion,
12167        __input: &[u8],
12168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12169        let avail_len = __input.len();
12170        let mut payload_buf = [0; Self::ENCODED_LEN];
12171        let mut buf = if avail_len < Self::ENCODED_LEN {
12172            payload_buf[0..avail_len].copy_from_slice(__input);
12173            Bytes::new(&payload_buf)
12174        } else {
12175            Bytes::new(__input)
12176        };
12177        let mut __struct = Self::default();
12178        let tmp = buf.get_u64_le();
12179        __struct.status =
12180            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12181                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12182                    flag_type: "MavGeneratorStatusFlag",
12183                    value: tmp as u64,
12184                })?;
12185        __struct.battery_current = buf.get_f32_le();
12186        __struct.load_current = buf.get_f32_le();
12187        __struct.power_generated = buf.get_f32_le();
12188        __struct.bus_voltage = buf.get_f32_le();
12189        __struct.bat_current_setpoint = buf.get_f32_le();
12190        __struct.runtime = buf.get_u32_le();
12191        __struct.time_until_maintenance = buf.get_i32_le();
12192        __struct.generator_speed = buf.get_u16_le();
12193        __struct.rectifier_temperature = buf.get_i16_le();
12194        __struct.generator_temperature = buf.get_i16_le();
12195        Ok(__struct)
12196    }
12197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12198        let mut __tmp = BytesMut::new(bytes);
12199        #[allow(clippy::absurd_extreme_comparisons)]
12200        #[allow(unused_comparisons)]
12201        if __tmp.remaining() < Self::ENCODED_LEN {
12202            panic!(
12203                "buffer is too small (need {} bytes, but got {})",
12204                Self::ENCODED_LEN,
12205                __tmp.remaining(),
12206            )
12207        }
12208        __tmp.put_u64_le(self.status.bits() as u64);
12209        __tmp.put_f32_le(self.battery_current);
12210        __tmp.put_f32_le(self.load_current);
12211        __tmp.put_f32_le(self.power_generated);
12212        __tmp.put_f32_le(self.bus_voltage);
12213        __tmp.put_f32_le(self.bat_current_setpoint);
12214        __tmp.put_u32_le(self.runtime);
12215        __tmp.put_i32_le(self.time_until_maintenance);
12216        __tmp.put_u16_le(self.generator_speed);
12217        __tmp.put_i16_le(self.rectifier_temperature);
12218        __tmp.put_i16_le(self.generator_temperature);
12219        if matches!(version, MavlinkVersion::V2) {
12220            let len = __tmp.len();
12221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12222        } else {
12223            __tmp.len()
12224        }
12225    }
12226}
12227#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12228#[doc = ""]
12229#[doc = "ID: 285"]
12230#[derive(Debug, Clone, PartialEq)]
12231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12233#[cfg_attr(feature = "ts", derive(TS))]
12234#[cfg_attr(feature = "ts", ts(export))]
12235pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12236    #[doc = "Timestamp (time since system boot)."]
12237    pub time_boot_ms: u32,
12238    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12240    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12241    pub q: [f32; 4],
12242    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12243    pub angular_velocity_x: f32,
12244    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12245    pub angular_velocity_y: f32,
12246    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12247    pub angular_velocity_z: f32,
12248    #[doc = "Failure flags (0 for no failure)"]
12249    pub failure_flags: GimbalDeviceErrorFlags,
12250    #[doc = "Current gimbal flags set."]
12251    pub flags: GimbalDeviceFlags,
12252    #[doc = "System ID"]
12253    pub target_system: u8,
12254    #[doc = "Component ID"]
12255    pub target_component: u8,
12256    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12258    pub delta_yaw: f32,
12259    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12260    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12261    pub delta_yaw_velocity: f32,
12262    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12264    pub gimbal_device_id: u8,
12265}
12266impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12267    pub const ENCODED_LEN: usize = 49usize;
12268    pub const DEFAULT: Self = Self {
12269        time_boot_ms: 0_u32,
12270        q: [0.0_f32; 4usize],
12271        angular_velocity_x: 0.0_f32,
12272        angular_velocity_y: 0.0_f32,
12273        angular_velocity_z: 0.0_f32,
12274        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12275        flags: GimbalDeviceFlags::DEFAULT,
12276        target_system: 0_u8,
12277        target_component: 0_u8,
12278        delta_yaw: 0.0_f32,
12279        delta_yaw_velocity: 0.0_f32,
12280        gimbal_device_id: 0_u8,
12281    };
12282    #[cfg(feature = "arbitrary")]
12283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12284        use arbitrary::{Arbitrary, Unstructured};
12285        let mut buf = [0u8; 1024];
12286        rng.fill_bytes(&mut buf);
12287        let mut unstructured = Unstructured::new(&buf);
12288        Self::arbitrary(&mut unstructured).unwrap_or_default()
12289    }
12290}
12291impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12292    fn default() -> Self {
12293        Self::DEFAULT.clone()
12294    }
12295}
12296impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12297    type Message = MavMessage;
12298    const ID: u32 = 285u32;
12299    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12300    const EXTRA_CRC: u8 = 137u8;
12301    const ENCODED_LEN: usize = 49usize;
12302    fn deser(
12303        _version: MavlinkVersion,
12304        __input: &[u8],
12305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12306        let avail_len = __input.len();
12307        let mut payload_buf = [0; Self::ENCODED_LEN];
12308        let mut buf = if avail_len < Self::ENCODED_LEN {
12309            payload_buf[0..avail_len].copy_from_slice(__input);
12310            Bytes::new(&payload_buf)
12311        } else {
12312            Bytes::new(__input)
12313        };
12314        let mut __struct = Self::default();
12315        __struct.time_boot_ms = buf.get_u32_le();
12316        for v in &mut __struct.q {
12317            let val = buf.get_f32_le();
12318            *v = val;
12319        }
12320        __struct.angular_velocity_x = buf.get_f32_le();
12321        __struct.angular_velocity_y = buf.get_f32_le();
12322        __struct.angular_velocity_z = buf.get_f32_le();
12323        let tmp = buf.get_u32_le();
12324        __struct.failure_flags =
12325            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12326                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12327                    flag_type: "GimbalDeviceErrorFlags",
12328                    value: tmp as u64,
12329                })?;
12330        let tmp = buf.get_u16_le();
12331        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12332            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12333                flag_type: "GimbalDeviceFlags",
12334                value: tmp as u64,
12335            })?;
12336        __struct.target_system = buf.get_u8();
12337        __struct.target_component = buf.get_u8();
12338        __struct.delta_yaw = buf.get_f32_le();
12339        __struct.delta_yaw_velocity = buf.get_f32_le();
12340        __struct.gimbal_device_id = buf.get_u8();
12341        Ok(__struct)
12342    }
12343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12344        let mut __tmp = BytesMut::new(bytes);
12345        #[allow(clippy::absurd_extreme_comparisons)]
12346        #[allow(unused_comparisons)]
12347        if __tmp.remaining() < Self::ENCODED_LEN {
12348            panic!(
12349                "buffer is too small (need {} bytes, but got {})",
12350                Self::ENCODED_LEN,
12351                __tmp.remaining(),
12352            )
12353        }
12354        __tmp.put_u32_le(self.time_boot_ms);
12355        for val in &self.q {
12356            __tmp.put_f32_le(*val);
12357        }
12358        __tmp.put_f32_le(self.angular_velocity_x);
12359        __tmp.put_f32_le(self.angular_velocity_y);
12360        __tmp.put_f32_le(self.angular_velocity_z);
12361        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12362        __tmp.put_u16_le(self.flags.bits() as u16);
12363        __tmp.put_u8(self.target_system);
12364        __tmp.put_u8(self.target_component);
12365        if matches!(version, MavlinkVersion::V2) {
12366            __tmp.put_f32_le(self.delta_yaw);
12367            __tmp.put_f32_le(self.delta_yaw_velocity);
12368            __tmp.put_u8(self.gimbal_device_id);
12369            let len = __tmp.len();
12370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12371        } else {
12372            __tmp.len()
12373        }
12374    }
12375}
12376#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12377#[doc = ""]
12378#[doc = "ID: 283"]
12379#[derive(Debug, Clone, PartialEq)]
12380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12382#[cfg_attr(feature = "ts", derive(TS))]
12383#[cfg_attr(feature = "ts", ts(export))]
12384pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12385    #[doc = "UID of gimbal hardware (0 if unknown)."]
12386    pub uid: u64,
12387    #[doc = "Timestamp (time since system boot)."]
12388    pub time_boot_ms: u32,
12389    #[doc = "0xff)."]
12390    pub firmware_version: u32,
12391    #[doc = "0xff)."]
12392    pub hardware_version: u32,
12393    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12394    pub roll_min: f32,
12395    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12396    pub roll_max: f32,
12397    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12398    pub pitch_min: f32,
12399    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12400    pub pitch_max: f32,
12401    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12402    pub yaw_min: f32,
12403    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12404    pub yaw_max: f32,
12405    #[doc = "Bitmap of gimbal capability flags."]
12406    pub cap_flags: GimbalDeviceCapFlags,
12407    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12408    pub custom_cap_flags: u16,
12409    #[doc = "Name of the gimbal vendor."]
12410    #[cfg_attr(feature = "ts", ts(type = "string"))]
12411    pub vendor_name: CharArray<32>,
12412    #[doc = "Name of the gimbal model."]
12413    #[cfg_attr(feature = "ts", ts(type = "string"))]
12414    pub model_name: CharArray<32>,
12415    #[doc = "Custom name of the gimbal given to it by the user."]
12416    #[cfg_attr(feature = "ts", ts(type = "string"))]
12417    pub custom_name: CharArray<32>,
12418    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12420    pub gimbal_device_id: u8,
12421}
12422impl GIMBAL_DEVICE_INFORMATION_DATA {
12423    pub const ENCODED_LEN: usize = 145usize;
12424    pub const DEFAULT: Self = Self {
12425        uid: 0_u64,
12426        time_boot_ms: 0_u32,
12427        firmware_version: 0_u32,
12428        hardware_version: 0_u32,
12429        roll_min: 0.0_f32,
12430        roll_max: 0.0_f32,
12431        pitch_min: 0.0_f32,
12432        pitch_max: 0.0_f32,
12433        yaw_min: 0.0_f32,
12434        yaw_max: 0.0_f32,
12435        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12436        custom_cap_flags: 0_u16,
12437        vendor_name: CharArray::new([0_u8; 32usize]),
12438        model_name: CharArray::new([0_u8; 32usize]),
12439        custom_name: CharArray::new([0_u8; 32usize]),
12440        gimbal_device_id: 0_u8,
12441    };
12442    #[cfg(feature = "arbitrary")]
12443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12444        use arbitrary::{Arbitrary, Unstructured};
12445        let mut buf = [0u8; 1024];
12446        rng.fill_bytes(&mut buf);
12447        let mut unstructured = Unstructured::new(&buf);
12448        Self::arbitrary(&mut unstructured).unwrap_or_default()
12449    }
12450}
12451impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12452    fn default() -> Self {
12453        Self::DEFAULT.clone()
12454    }
12455}
12456impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12457    type Message = MavMessage;
12458    const ID: u32 = 283u32;
12459    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12460    const EXTRA_CRC: u8 = 74u8;
12461    const ENCODED_LEN: usize = 145usize;
12462    fn deser(
12463        _version: MavlinkVersion,
12464        __input: &[u8],
12465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12466        let avail_len = __input.len();
12467        let mut payload_buf = [0; Self::ENCODED_LEN];
12468        let mut buf = if avail_len < Self::ENCODED_LEN {
12469            payload_buf[0..avail_len].copy_from_slice(__input);
12470            Bytes::new(&payload_buf)
12471        } else {
12472            Bytes::new(__input)
12473        };
12474        let mut __struct = Self::default();
12475        __struct.uid = buf.get_u64_le();
12476        __struct.time_boot_ms = buf.get_u32_le();
12477        __struct.firmware_version = buf.get_u32_le();
12478        __struct.hardware_version = buf.get_u32_le();
12479        __struct.roll_min = buf.get_f32_le();
12480        __struct.roll_max = buf.get_f32_le();
12481        __struct.pitch_min = buf.get_f32_le();
12482        __struct.pitch_max = buf.get_f32_le();
12483        __struct.yaw_min = buf.get_f32_le();
12484        __struct.yaw_max = buf.get_f32_le();
12485        let tmp = buf.get_u16_le();
12486        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12487            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12488        )
12489        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12490            flag_type: "GimbalDeviceCapFlags",
12491            value: tmp as u64,
12492        })?;
12493        __struct.custom_cap_flags = buf.get_u16_le();
12494        let mut tmp = [0_u8; 32usize];
12495        for v in &mut tmp {
12496            *v = buf.get_u8();
12497        }
12498        __struct.vendor_name = CharArray::new(tmp);
12499        let mut tmp = [0_u8; 32usize];
12500        for v in &mut tmp {
12501            *v = buf.get_u8();
12502        }
12503        __struct.model_name = CharArray::new(tmp);
12504        let mut tmp = [0_u8; 32usize];
12505        for v in &mut tmp {
12506            *v = buf.get_u8();
12507        }
12508        __struct.custom_name = CharArray::new(tmp);
12509        __struct.gimbal_device_id = buf.get_u8();
12510        Ok(__struct)
12511    }
12512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12513        let mut __tmp = BytesMut::new(bytes);
12514        #[allow(clippy::absurd_extreme_comparisons)]
12515        #[allow(unused_comparisons)]
12516        if __tmp.remaining() < Self::ENCODED_LEN {
12517            panic!(
12518                "buffer is too small (need {} bytes, but got {})",
12519                Self::ENCODED_LEN,
12520                __tmp.remaining(),
12521            )
12522        }
12523        __tmp.put_u64_le(self.uid);
12524        __tmp.put_u32_le(self.time_boot_ms);
12525        __tmp.put_u32_le(self.firmware_version);
12526        __tmp.put_u32_le(self.hardware_version);
12527        __tmp.put_f32_le(self.roll_min);
12528        __tmp.put_f32_le(self.roll_max);
12529        __tmp.put_f32_le(self.pitch_min);
12530        __tmp.put_f32_le(self.pitch_max);
12531        __tmp.put_f32_le(self.yaw_min);
12532        __tmp.put_f32_le(self.yaw_max);
12533        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12534        __tmp.put_u16_le(self.custom_cap_flags);
12535        for val in &self.vendor_name {
12536            __tmp.put_u8(*val);
12537        }
12538        for val in &self.model_name {
12539            __tmp.put_u8(*val);
12540        }
12541        for val in &self.custom_name {
12542            __tmp.put_u8(*val);
12543        }
12544        if matches!(version, MavlinkVersion::V2) {
12545            __tmp.put_u8(self.gimbal_device_id);
12546            let len = __tmp.len();
12547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12548        } else {
12549            __tmp.len()
12550        }
12551    }
12552}
12553#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12554#[doc = ""]
12555#[doc = "ID: 284"]
12556#[derive(Debug, Clone, PartialEq)]
12557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12559#[cfg_attr(feature = "ts", derive(TS))]
12560#[cfg_attr(feature = "ts", ts(export))]
12561pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12562    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12564    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12565    pub q: [f32; 4],
12566    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12567    pub angular_velocity_x: f32,
12568    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12569    pub angular_velocity_y: f32,
12570    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12571    pub angular_velocity_z: f32,
12572    #[doc = "Low level gimbal flags."]
12573    pub flags: GimbalDeviceFlags,
12574    #[doc = "System ID"]
12575    pub target_system: u8,
12576    #[doc = "Component ID"]
12577    pub target_component: u8,
12578}
12579impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12580    pub const ENCODED_LEN: usize = 32usize;
12581    pub const DEFAULT: Self = Self {
12582        q: [0.0_f32; 4usize],
12583        angular_velocity_x: 0.0_f32,
12584        angular_velocity_y: 0.0_f32,
12585        angular_velocity_z: 0.0_f32,
12586        flags: GimbalDeviceFlags::DEFAULT,
12587        target_system: 0_u8,
12588        target_component: 0_u8,
12589    };
12590    #[cfg(feature = "arbitrary")]
12591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12592        use arbitrary::{Arbitrary, Unstructured};
12593        let mut buf = [0u8; 1024];
12594        rng.fill_bytes(&mut buf);
12595        let mut unstructured = Unstructured::new(&buf);
12596        Self::arbitrary(&mut unstructured).unwrap_or_default()
12597    }
12598}
12599impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12600    fn default() -> Self {
12601        Self::DEFAULT.clone()
12602    }
12603}
12604impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12605    type Message = MavMessage;
12606    const ID: u32 = 284u32;
12607    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12608    const EXTRA_CRC: u8 = 99u8;
12609    const ENCODED_LEN: usize = 32usize;
12610    fn deser(
12611        _version: MavlinkVersion,
12612        __input: &[u8],
12613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12614        let avail_len = __input.len();
12615        let mut payload_buf = [0; Self::ENCODED_LEN];
12616        let mut buf = if avail_len < Self::ENCODED_LEN {
12617            payload_buf[0..avail_len].copy_from_slice(__input);
12618            Bytes::new(&payload_buf)
12619        } else {
12620            Bytes::new(__input)
12621        };
12622        let mut __struct = Self::default();
12623        for v in &mut __struct.q {
12624            let val = buf.get_f32_le();
12625            *v = val;
12626        }
12627        __struct.angular_velocity_x = buf.get_f32_le();
12628        __struct.angular_velocity_y = buf.get_f32_le();
12629        __struct.angular_velocity_z = buf.get_f32_le();
12630        let tmp = buf.get_u16_le();
12631        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12632            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12633                flag_type: "GimbalDeviceFlags",
12634                value: tmp as u64,
12635            })?;
12636        __struct.target_system = buf.get_u8();
12637        __struct.target_component = buf.get_u8();
12638        Ok(__struct)
12639    }
12640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12641        let mut __tmp = BytesMut::new(bytes);
12642        #[allow(clippy::absurd_extreme_comparisons)]
12643        #[allow(unused_comparisons)]
12644        if __tmp.remaining() < Self::ENCODED_LEN {
12645            panic!(
12646                "buffer is too small (need {} bytes, but got {})",
12647                Self::ENCODED_LEN,
12648                __tmp.remaining(),
12649            )
12650        }
12651        for val in &self.q {
12652            __tmp.put_f32_le(*val);
12653        }
12654        __tmp.put_f32_le(self.angular_velocity_x);
12655        __tmp.put_f32_le(self.angular_velocity_y);
12656        __tmp.put_f32_le(self.angular_velocity_z);
12657        __tmp.put_u16_le(self.flags.bits() as u16);
12658        __tmp.put_u8(self.target_system);
12659        __tmp.put_u8(self.target_component);
12660        if matches!(version, MavlinkVersion::V2) {
12661            let len = __tmp.len();
12662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12663        } else {
12664            __tmp.len()
12665        }
12666    }
12667}
12668#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12669#[doc = ""]
12670#[doc = "ID: 280"]
12671#[derive(Debug, Clone, PartialEq)]
12672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12674#[cfg_attr(feature = "ts", derive(TS))]
12675#[cfg_attr(feature = "ts", ts(export))]
12676pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12677    #[doc = "Timestamp (time since system boot)."]
12678    pub time_boot_ms: u32,
12679    #[doc = "Bitmap of gimbal capability flags."]
12680    pub cap_flags: GimbalManagerCapFlags,
12681    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12682    pub roll_min: f32,
12683    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12684    pub roll_max: f32,
12685    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12686    pub pitch_min: f32,
12687    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12688    pub pitch_max: f32,
12689    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12690    pub yaw_min: f32,
12691    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12692    pub yaw_max: f32,
12693    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12694    pub gimbal_device_id: u8,
12695}
12696impl GIMBAL_MANAGER_INFORMATION_DATA {
12697    pub const ENCODED_LEN: usize = 33usize;
12698    pub const DEFAULT: Self = Self {
12699        time_boot_ms: 0_u32,
12700        cap_flags: GimbalManagerCapFlags::DEFAULT,
12701        roll_min: 0.0_f32,
12702        roll_max: 0.0_f32,
12703        pitch_min: 0.0_f32,
12704        pitch_max: 0.0_f32,
12705        yaw_min: 0.0_f32,
12706        yaw_max: 0.0_f32,
12707        gimbal_device_id: 0_u8,
12708    };
12709    #[cfg(feature = "arbitrary")]
12710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12711        use arbitrary::{Arbitrary, Unstructured};
12712        let mut buf = [0u8; 1024];
12713        rng.fill_bytes(&mut buf);
12714        let mut unstructured = Unstructured::new(&buf);
12715        Self::arbitrary(&mut unstructured).unwrap_or_default()
12716    }
12717}
12718impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12719    fn default() -> Self {
12720        Self::DEFAULT.clone()
12721    }
12722}
12723impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12724    type Message = MavMessage;
12725    const ID: u32 = 280u32;
12726    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12727    const EXTRA_CRC: u8 = 70u8;
12728    const ENCODED_LEN: usize = 33usize;
12729    fn deser(
12730        _version: MavlinkVersion,
12731        __input: &[u8],
12732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12733        let avail_len = __input.len();
12734        let mut payload_buf = [0; Self::ENCODED_LEN];
12735        let mut buf = if avail_len < Self::ENCODED_LEN {
12736            payload_buf[0..avail_len].copy_from_slice(__input);
12737            Bytes::new(&payload_buf)
12738        } else {
12739            Bytes::new(__input)
12740        };
12741        let mut __struct = Self::default();
12742        __struct.time_boot_ms = buf.get_u32_le();
12743        let tmp = buf.get_u32_le();
12744        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12745            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12746        )
12747        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12748            flag_type: "GimbalManagerCapFlags",
12749            value: tmp as u64,
12750        })?;
12751        __struct.roll_min = buf.get_f32_le();
12752        __struct.roll_max = buf.get_f32_le();
12753        __struct.pitch_min = buf.get_f32_le();
12754        __struct.pitch_max = buf.get_f32_le();
12755        __struct.yaw_min = buf.get_f32_le();
12756        __struct.yaw_max = buf.get_f32_le();
12757        __struct.gimbal_device_id = buf.get_u8();
12758        Ok(__struct)
12759    }
12760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12761        let mut __tmp = BytesMut::new(bytes);
12762        #[allow(clippy::absurd_extreme_comparisons)]
12763        #[allow(unused_comparisons)]
12764        if __tmp.remaining() < Self::ENCODED_LEN {
12765            panic!(
12766                "buffer is too small (need {} bytes, but got {})",
12767                Self::ENCODED_LEN,
12768                __tmp.remaining(),
12769            )
12770        }
12771        __tmp.put_u32_le(self.time_boot_ms);
12772        __tmp.put_u32_le(self.cap_flags.bits() as u32);
12773        __tmp.put_f32_le(self.roll_min);
12774        __tmp.put_f32_le(self.roll_max);
12775        __tmp.put_f32_le(self.pitch_min);
12776        __tmp.put_f32_le(self.pitch_max);
12777        __tmp.put_f32_le(self.yaw_min);
12778        __tmp.put_f32_le(self.yaw_max);
12779        __tmp.put_u8(self.gimbal_device_id);
12780        if matches!(version, MavlinkVersion::V2) {
12781            let len = __tmp.len();
12782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12783        } else {
12784            __tmp.len()
12785        }
12786    }
12787}
12788#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12789#[doc = ""]
12790#[doc = "ID: 282"]
12791#[derive(Debug, Clone, PartialEq)]
12792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12794#[cfg_attr(feature = "ts", derive(TS))]
12795#[cfg_attr(feature = "ts", ts(export))]
12796pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12797    #[doc = "High level gimbal manager flags to use."]
12798    pub flags: GimbalManagerFlags,
12799    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12801    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12802    pub q: [f32; 4],
12803    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12804    pub angular_velocity_x: f32,
12805    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12806    pub angular_velocity_y: f32,
12807    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12808    pub angular_velocity_z: f32,
12809    #[doc = "System ID"]
12810    pub target_system: u8,
12811    #[doc = "Component ID"]
12812    pub target_component: u8,
12813    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12814    pub gimbal_device_id: u8,
12815}
12816impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12817    pub const ENCODED_LEN: usize = 35usize;
12818    pub const DEFAULT: Self = Self {
12819        flags: GimbalManagerFlags::DEFAULT,
12820        q: [0.0_f32; 4usize],
12821        angular_velocity_x: 0.0_f32,
12822        angular_velocity_y: 0.0_f32,
12823        angular_velocity_z: 0.0_f32,
12824        target_system: 0_u8,
12825        target_component: 0_u8,
12826        gimbal_device_id: 0_u8,
12827    };
12828    #[cfg(feature = "arbitrary")]
12829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12830        use arbitrary::{Arbitrary, Unstructured};
12831        let mut buf = [0u8; 1024];
12832        rng.fill_bytes(&mut buf);
12833        let mut unstructured = Unstructured::new(&buf);
12834        Self::arbitrary(&mut unstructured).unwrap_or_default()
12835    }
12836}
12837impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12838    fn default() -> Self {
12839        Self::DEFAULT.clone()
12840    }
12841}
12842impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12843    type Message = MavMessage;
12844    const ID: u32 = 282u32;
12845    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12846    const EXTRA_CRC: u8 = 123u8;
12847    const ENCODED_LEN: usize = 35usize;
12848    fn deser(
12849        _version: MavlinkVersion,
12850        __input: &[u8],
12851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12852        let avail_len = __input.len();
12853        let mut payload_buf = [0; Self::ENCODED_LEN];
12854        let mut buf = if avail_len < Self::ENCODED_LEN {
12855            payload_buf[0..avail_len].copy_from_slice(__input);
12856            Bytes::new(&payload_buf)
12857        } else {
12858            Bytes::new(__input)
12859        };
12860        let mut __struct = Self::default();
12861        let tmp = buf.get_u32_le();
12862        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12863            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12864                flag_type: "GimbalManagerFlags",
12865                value: tmp as u64,
12866            })?;
12867        for v in &mut __struct.q {
12868            let val = buf.get_f32_le();
12869            *v = val;
12870        }
12871        __struct.angular_velocity_x = buf.get_f32_le();
12872        __struct.angular_velocity_y = buf.get_f32_le();
12873        __struct.angular_velocity_z = buf.get_f32_le();
12874        __struct.target_system = buf.get_u8();
12875        __struct.target_component = buf.get_u8();
12876        __struct.gimbal_device_id = buf.get_u8();
12877        Ok(__struct)
12878    }
12879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12880        let mut __tmp = BytesMut::new(bytes);
12881        #[allow(clippy::absurd_extreme_comparisons)]
12882        #[allow(unused_comparisons)]
12883        if __tmp.remaining() < Self::ENCODED_LEN {
12884            panic!(
12885                "buffer is too small (need {} bytes, but got {})",
12886                Self::ENCODED_LEN,
12887                __tmp.remaining(),
12888            )
12889        }
12890        __tmp.put_u32_le(self.flags.bits() as u32);
12891        for val in &self.q {
12892            __tmp.put_f32_le(*val);
12893        }
12894        __tmp.put_f32_le(self.angular_velocity_x);
12895        __tmp.put_f32_le(self.angular_velocity_y);
12896        __tmp.put_f32_le(self.angular_velocity_z);
12897        __tmp.put_u8(self.target_system);
12898        __tmp.put_u8(self.target_component);
12899        __tmp.put_u8(self.gimbal_device_id);
12900        if matches!(version, MavlinkVersion::V2) {
12901            let len = __tmp.len();
12902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12903        } else {
12904            __tmp.len()
12905        }
12906    }
12907}
12908#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12909#[doc = ""]
12910#[doc = "ID: 288"]
12911#[derive(Debug, Clone, PartialEq)]
12912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12914#[cfg_attr(feature = "ts", derive(TS))]
12915#[cfg_attr(feature = "ts", ts(export))]
12916pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12917    #[doc = "High level gimbal manager flags."]
12918    pub flags: GimbalManagerFlags,
12919    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12920    pub pitch: f32,
12921    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12922    pub yaw: f32,
12923    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12924    pub pitch_rate: f32,
12925    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12926    pub yaw_rate: f32,
12927    #[doc = "System ID"]
12928    pub target_system: u8,
12929    #[doc = "Component ID"]
12930    pub target_component: u8,
12931    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12932    pub gimbal_device_id: u8,
12933}
12934impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12935    pub const ENCODED_LEN: usize = 23usize;
12936    pub const DEFAULT: Self = Self {
12937        flags: GimbalManagerFlags::DEFAULT,
12938        pitch: 0.0_f32,
12939        yaw: 0.0_f32,
12940        pitch_rate: 0.0_f32,
12941        yaw_rate: 0.0_f32,
12942        target_system: 0_u8,
12943        target_component: 0_u8,
12944        gimbal_device_id: 0_u8,
12945    };
12946    #[cfg(feature = "arbitrary")]
12947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12948        use arbitrary::{Arbitrary, Unstructured};
12949        let mut buf = [0u8; 1024];
12950        rng.fill_bytes(&mut buf);
12951        let mut unstructured = Unstructured::new(&buf);
12952        Self::arbitrary(&mut unstructured).unwrap_or_default()
12953    }
12954}
12955impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12956    fn default() -> Self {
12957        Self::DEFAULT.clone()
12958    }
12959}
12960impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12961    type Message = MavMessage;
12962    const ID: u32 = 288u32;
12963    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12964    const EXTRA_CRC: u8 = 20u8;
12965    const ENCODED_LEN: usize = 23usize;
12966    fn deser(
12967        _version: MavlinkVersion,
12968        __input: &[u8],
12969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12970        let avail_len = __input.len();
12971        let mut payload_buf = [0; Self::ENCODED_LEN];
12972        let mut buf = if avail_len < Self::ENCODED_LEN {
12973            payload_buf[0..avail_len].copy_from_slice(__input);
12974            Bytes::new(&payload_buf)
12975        } else {
12976            Bytes::new(__input)
12977        };
12978        let mut __struct = Self::default();
12979        let tmp = buf.get_u32_le();
12980        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12981            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12982                flag_type: "GimbalManagerFlags",
12983                value: tmp as u64,
12984            })?;
12985        __struct.pitch = buf.get_f32_le();
12986        __struct.yaw = buf.get_f32_le();
12987        __struct.pitch_rate = buf.get_f32_le();
12988        __struct.yaw_rate = buf.get_f32_le();
12989        __struct.target_system = buf.get_u8();
12990        __struct.target_component = buf.get_u8();
12991        __struct.gimbal_device_id = buf.get_u8();
12992        Ok(__struct)
12993    }
12994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12995        let mut __tmp = BytesMut::new(bytes);
12996        #[allow(clippy::absurd_extreme_comparisons)]
12997        #[allow(unused_comparisons)]
12998        if __tmp.remaining() < Self::ENCODED_LEN {
12999            panic!(
13000                "buffer is too small (need {} bytes, but got {})",
13001                Self::ENCODED_LEN,
13002                __tmp.remaining(),
13003            )
13004        }
13005        __tmp.put_u32_le(self.flags.bits() as u32);
13006        __tmp.put_f32_le(self.pitch);
13007        __tmp.put_f32_le(self.yaw);
13008        __tmp.put_f32_le(self.pitch_rate);
13009        __tmp.put_f32_le(self.yaw_rate);
13010        __tmp.put_u8(self.target_system);
13011        __tmp.put_u8(self.target_component);
13012        __tmp.put_u8(self.gimbal_device_id);
13013        if matches!(version, MavlinkVersion::V2) {
13014            let len = __tmp.len();
13015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13016        } else {
13017            __tmp.len()
13018        }
13019    }
13020}
13021#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13022#[doc = ""]
13023#[doc = "ID: 287"]
13024#[derive(Debug, Clone, PartialEq)]
13025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13027#[cfg_attr(feature = "ts", derive(TS))]
13028#[cfg_attr(feature = "ts", ts(export))]
13029pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13030    #[doc = "High level gimbal manager flags to use."]
13031    pub flags: GimbalManagerFlags,
13032    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13033    pub pitch: f32,
13034    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13035    pub yaw: f32,
13036    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13037    pub pitch_rate: f32,
13038    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13039    pub yaw_rate: f32,
13040    #[doc = "System ID"]
13041    pub target_system: u8,
13042    #[doc = "Component ID"]
13043    pub target_component: u8,
13044    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13045    pub gimbal_device_id: u8,
13046}
13047impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13048    pub const ENCODED_LEN: usize = 23usize;
13049    pub const DEFAULT: Self = Self {
13050        flags: GimbalManagerFlags::DEFAULT,
13051        pitch: 0.0_f32,
13052        yaw: 0.0_f32,
13053        pitch_rate: 0.0_f32,
13054        yaw_rate: 0.0_f32,
13055        target_system: 0_u8,
13056        target_component: 0_u8,
13057        gimbal_device_id: 0_u8,
13058    };
13059    #[cfg(feature = "arbitrary")]
13060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13061        use arbitrary::{Arbitrary, Unstructured};
13062        let mut buf = [0u8; 1024];
13063        rng.fill_bytes(&mut buf);
13064        let mut unstructured = Unstructured::new(&buf);
13065        Self::arbitrary(&mut unstructured).unwrap_or_default()
13066    }
13067}
13068impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13069    fn default() -> Self {
13070        Self::DEFAULT.clone()
13071    }
13072}
13073impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13074    type Message = MavMessage;
13075    const ID: u32 = 287u32;
13076    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13077    const EXTRA_CRC: u8 = 1u8;
13078    const ENCODED_LEN: usize = 23usize;
13079    fn deser(
13080        _version: MavlinkVersion,
13081        __input: &[u8],
13082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13083        let avail_len = __input.len();
13084        let mut payload_buf = [0; Self::ENCODED_LEN];
13085        let mut buf = if avail_len < Self::ENCODED_LEN {
13086            payload_buf[0..avail_len].copy_from_slice(__input);
13087            Bytes::new(&payload_buf)
13088        } else {
13089            Bytes::new(__input)
13090        };
13091        let mut __struct = Self::default();
13092        let tmp = buf.get_u32_le();
13093        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13094            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13095                flag_type: "GimbalManagerFlags",
13096                value: tmp as u64,
13097            })?;
13098        __struct.pitch = buf.get_f32_le();
13099        __struct.yaw = buf.get_f32_le();
13100        __struct.pitch_rate = buf.get_f32_le();
13101        __struct.yaw_rate = buf.get_f32_le();
13102        __struct.target_system = buf.get_u8();
13103        __struct.target_component = buf.get_u8();
13104        __struct.gimbal_device_id = buf.get_u8();
13105        Ok(__struct)
13106    }
13107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13108        let mut __tmp = BytesMut::new(bytes);
13109        #[allow(clippy::absurd_extreme_comparisons)]
13110        #[allow(unused_comparisons)]
13111        if __tmp.remaining() < Self::ENCODED_LEN {
13112            panic!(
13113                "buffer is too small (need {} bytes, but got {})",
13114                Self::ENCODED_LEN,
13115                __tmp.remaining(),
13116            )
13117        }
13118        __tmp.put_u32_le(self.flags.bits() as u32);
13119        __tmp.put_f32_le(self.pitch);
13120        __tmp.put_f32_le(self.yaw);
13121        __tmp.put_f32_le(self.pitch_rate);
13122        __tmp.put_f32_le(self.yaw_rate);
13123        __tmp.put_u8(self.target_system);
13124        __tmp.put_u8(self.target_component);
13125        __tmp.put_u8(self.gimbal_device_id);
13126        if matches!(version, MavlinkVersion::V2) {
13127            let len = __tmp.len();
13128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13129        } else {
13130            __tmp.len()
13131        }
13132    }
13133}
13134#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13135#[doc = ""]
13136#[doc = "ID: 281"]
13137#[derive(Debug, Clone, PartialEq)]
13138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13140#[cfg_attr(feature = "ts", derive(TS))]
13141#[cfg_attr(feature = "ts", ts(export))]
13142pub struct GIMBAL_MANAGER_STATUS_DATA {
13143    #[doc = "Timestamp (time since system boot)."]
13144    pub time_boot_ms: u32,
13145    #[doc = "High level gimbal manager flags currently applied."]
13146    pub flags: GimbalManagerFlags,
13147    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13148    pub gimbal_device_id: u8,
13149    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13150    pub primary_control_sysid: u8,
13151    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13152    pub primary_control_compid: u8,
13153    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13154    pub secondary_control_sysid: u8,
13155    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13156    pub secondary_control_compid: u8,
13157}
13158impl GIMBAL_MANAGER_STATUS_DATA {
13159    pub const ENCODED_LEN: usize = 13usize;
13160    pub const DEFAULT: Self = Self {
13161        time_boot_ms: 0_u32,
13162        flags: GimbalManagerFlags::DEFAULT,
13163        gimbal_device_id: 0_u8,
13164        primary_control_sysid: 0_u8,
13165        primary_control_compid: 0_u8,
13166        secondary_control_sysid: 0_u8,
13167        secondary_control_compid: 0_u8,
13168    };
13169    #[cfg(feature = "arbitrary")]
13170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13171        use arbitrary::{Arbitrary, Unstructured};
13172        let mut buf = [0u8; 1024];
13173        rng.fill_bytes(&mut buf);
13174        let mut unstructured = Unstructured::new(&buf);
13175        Self::arbitrary(&mut unstructured).unwrap_or_default()
13176    }
13177}
13178impl Default for GIMBAL_MANAGER_STATUS_DATA {
13179    fn default() -> Self {
13180        Self::DEFAULT.clone()
13181    }
13182}
13183impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13184    type Message = MavMessage;
13185    const ID: u32 = 281u32;
13186    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13187    const EXTRA_CRC: u8 = 48u8;
13188    const ENCODED_LEN: usize = 13usize;
13189    fn deser(
13190        _version: MavlinkVersion,
13191        __input: &[u8],
13192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13193        let avail_len = __input.len();
13194        let mut payload_buf = [0; Self::ENCODED_LEN];
13195        let mut buf = if avail_len < Self::ENCODED_LEN {
13196            payload_buf[0..avail_len].copy_from_slice(__input);
13197            Bytes::new(&payload_buf)
13198        } else {
13199            Bytes::new(__input)
13200        };
13201        let mut __struct = Self::default();
13202        __struct.time_boot_ms = buf.get_u32_le();
13203        let tmp = buf.get_u32_le();
13204        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13205            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13206                flag_type: "GimbalManagerFlags",
13207                value: tmp as u64,
13208            })?;
13209        __struct.gimbal_device_id = buf.get_u8();
13210        __struct.primary_control_sysid = buf.get_u8();
13211        __struct.primary_control_compid = buf.get_u8();
13212        __struct.secondary_control_sysid = buf.get_u8();
13213        __struct.secondary_control_compid = buf.get_u8();
13214        Ok(__struct)
13215    }
13216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13217        let mut __tmp = BytesMut::new(bytes);
13218        #[allow(clippy::absurd_extreme_comparisons)]
13219        #[allow(unused_comparisons)]
13220        if __tmp.remaining() < Self::ENCODED_LEN {
13221            panic!(
13222                "buffer is too small (need {} bytes, but got {})",
13223                Self::ENCODED_LEN,
13224                __tmp.remaining(),
13225            )
13226        }
13227        __tmp.put_u32_le(self.time_boot_ms);
13228        __tmp.put_u32_le(self.flags.bits() as u32);
13229        __tmp.put_u8(self.gimbal_device_id);
13230        __tmp.put_u8(self.primary_control_sysid);
13231        __tmp.put_u8(self.primary_control_compid);
13232        __tmp.put_u8(self.secondary_control_sysid);
13233        __tmp.put_u8(self.secondary_control_compid);
13234        if matches!(version, MavlinkVersion::V2) {
13235            let len = __tmp.len();
13236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13237        } else {
13238            __tmp.len()
13239        }
13240    }
13241}
13242#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13243#[doc = ""]
13244#[doc = "ID: 33"]
13245#[derive(Debug, Clone, PartialEq)]
13246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13248#[cfg_attr(feature = "ts", derive(TS))]
13249#[cfg_attr(feature = "ts", ts(export))]
13250pub struct GLOBAL_POSITION_INT_DATA {
13251    #[doc = "Timestamp (time since system boot)."]
13252    pub time_boot_ms: u32,
13253    #[doc = "Latitude, expressed"]
13254    pub lat: i32,
13255    #[doc = "Longitude, expressed"]
13256    pub lon: i32,
13257    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13258    pub alt: i32,
13259    #[doc = "Altitude above home"]
13260    pub relative_alt: i32,
13261    #[doc = "Ground X Speed (Latitude, positive north)"]
13262    pub vx: i16,
13263    #[doc = "Ground Y Speed (Longitude, positive east)"]
13264    pub vy: i16,
13265    #[doc = "Ground Z Speed (Altitude, positive down)"]
13266    pub vz: i16,
13267    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13268    pub hdg: u16,
13269}
13270impl GLOBAL_POSITION_INT_DATA {
13271    pub const ENCODED_LEN: usize = 28usize;
13272    pub const DEFAULT: Self = Self {
13273        time_boot_ms: 0_u32,
13274        lat: 0_i32,
13275        lon: 0_i32,
13276        alt: 0_i32,
13277        relative_alt: 0_i32,
13278        vx: 0_i16,
13279        vy: 0_i16,
13280        vz: 0_i16,
13281        hdg: 0_u16,
13282    };
13283    #[cfg(feature = "arbitrary")]
13284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13285        use arbitrary::{Arbitrary, Unstructured};
13286        let mut buf = [0u8; 1024];
13287        rng.fill_bytes(&mut buf);
13288        let mut unstructured = Unstructured::new(&buf);
13289        Self::arbitrary(&mut unstructured).unwrap_or_default()
13290    }
13291}
13292impl Default for GLOBAL_POSITION_INT_DATA {
13293    fn default() -> Self {
13294        Self::DEFAULT.clone()
13295    }
13296}
13297impl MessageData for GLOBAL_POSITION_INT_DATA {
13298    type Message = MavMessage;
13299    const ID: u32 = 33u32;
13300    const NAME: &'static str = "GLOBAL_POSITION_INT";
13301    const EXTRA_CRC: u8 = 104u8;
13302    const ENCODED_LEN: usize = 28usize;
13303    fn deser(
13304        _version: MavlinkVersion,
13305        __input: &[u8],
13306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13307        let avail_len = __input.len();
13308        let mut payload_buf = [0; Self::ENCODED_LEN];
13309        let mut buf = if avail_len < Self::ENCODED_LEN {
13310            payload_buf[0..avail_len].copy_from_slice(__input);
13311            Bytes::new(&payload_buf)
13312        } else {
13313            Bytes::new(__input)
13314        };
13315        let mut __struct = Self::default();
13316        __struct.time_boot_ms = buf.get_u32_le();
13317        __struct.lat = buf.get_i32_le();
13318        __struct.lon = buf.get_i32_le();
13319        __struct.alt = buf.get_i32_le();
13320        __struct.relative_alt = buf.get_i32_le();
13321        __struct.vx = buf.get_i16_le();
13322        __struct.vy = buf.get_i16_le();
13323        __struct.vz = buf.get_i16_le();
13324        __struct.hdg = buf.get_u16_le();
13325        Ok(__struct)
13326    }
13327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13328        let mut __tmp = BytesMut::new(bytes);
13329        #[allow(clippy::absurd_extreme_comparisons)]
13330        #[allow(unused_comparisons)]
13331        if __tmp.remaining() < Self::ENCODED_LEN {
13332            panic!(
13333                "buffer is too small (need {} bytes, but got {})",
13334                Self::ENCODED_LEN,
13335                __tmp.remaining(),
13336            )
13337        }
13338        __tmp.put_u32_le(self.time_boot_ms);
13339        __tmp.put_i32_le(self.lat);
13340        __tmp.put_i32_le(self.lon);
13341        __tmp.put_i32_le(self.alt);
13342        __tmp.put_i32_le(self.relative_alt);
13343        __tmp.put_i16_le(self.vx);
13344        __tmp.put_i16_le(self.vy);
13345        __tmp.put_i16_le(self.vz);
13346        __tmp.put_u16_le(self.hdg);
13347        if matches!(version, MavlinkVersion::V2) {
13348            let len = __tmp.len();
13349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13350        } else {
13351            __tmp.len()
13352        }
13353    }
13354}
13355#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13356#[doc = ""]
13357#[doc = "ID: 63"]
13358#[derive(Debug, Clone, PartialEq)]
13359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13361#[cfg_attr(feature = "ts", derive(TS))]
13362#[cfg_attr(feature = "ts", ts(export))]
13363pub struct GLOBAL_POSITION_INT_COV_DATA {
13364    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13365    pub time_usec: u64,
13366    #[doc = "Latitude"]
13367    pub lat: i32,
13368    #[doc = "Longitude"]
13369    pub lon: i32,
13370    #[doc = "Altitude in meters above MSL"]
13371    pub alt: i32,
13372    #[doc = "Altitude above ground"]
13373    pub relative_alt: i32,
13374    #[doc = "Ground X Speed (Latitude)"]
13375    pub vx: f32,
13376    #[doc = "Ground Y Speed (Longitude)"]
13377    pub vy: f32,
13378    #[doc = "Ground Z Speed (Altitude)"]
13379    pub vz: f32,
13380    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13381    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13382    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13383    pub covariance: [f32; 36],
13384    #[doc = "Class id of the estimator this estimate originated from."]
13385    pub estimator_type: MavEstimatorType,
13386}
13387impl GLOBAL_POSITION_INT_COV_DATA {
13388    pub const ENCODED_LEN: usize = 181usize;
13389    pub const DEFAULT: Self = Self {
13390        time_usec: 0_u64,
13391        lat: 0_i32,
13392        lon: 0_i32,
13393        alt: 0_i32,
13394        relative_alt: 0_i32,
13395        vx: 0.0_f32,
13396        vy: 0.0_f32,
13397        vz: 0.0_f32,
13398        covariance: [0.0_f32; 36usize],
13399        estimator_type: MavEstimatorType::DEFAULT,
13400    };
13401    #[cfg(feature = "arbitrary")]
13402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13403        use arbitrary::{Arbitrary, Unstructured};
13404        let mut buf = [0u8; 1024];
13405        rng.fill_bytes(&mut buf);
13406        let mut unstructured = Unstructured::new(&buf);
13407        Self::arbitrary(&mut unstructured).unwrap_or_default()
13408    }
13409}
13410impl Default for GLOBAL_POSITION_INT_COV_DATA {
13411    fn default() -> Self {
13412        Self::DEFAULT.clone()
13413    }
13414}
13415impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13416    type Message = MavMessage;
13417    const ID: u32 = 63u32;
13418    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13419    const EXTRA_CRC: u8 = 119u8;
13420    const ENCODED_LEN: usize = 181usize;
13421    fn deser(
13422        _version: MavlinkVersion,
13423        __input: &[u8],
13424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13425        let avail_len = __input.len();
13426        let mut payload_buf = [0; Self::ENCODED_LEN];
13427        let mut buf = if avail_len < Self::ENCODED_LEN {
13428            payload_buf[0..avail_len].copy_from_slice(__input);
13429            Bytes::new(&payload_buf)
13430        } else {
13431            Bytes::new(__input)
13432        };
13433        let mut __struct = Self::default();
13434        __struct.time_usec = buf.get_u64_le();
13435        __struct.lat = buf.get_i32_le();
13436        __struct.lon = buf.get_i32_le();
13437        __struct.alt = buf.get_i32_le();
13438        __struct.relative_alt = buf.get_i32_le();
13439        __struct.vx = buf.get_f32_le();
13440        __struct.vy = buf.get_f32_le();
13441        __struct.vz = buf.get_f32_le();
13442        for v in &mut __struct.covariance {
13443            let val = buf.get_f32_le();
13444            *v = val;
13445        }
13446        let tmp = buf.get_u8();
13447        __struct.estimator_type =
13448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13449                enum_type: "MavEstimatorType",
13450                value: tmp as u64,
13451            })?;
13452        Ok(__struct)
13453    }
13454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13455        let mut __tmp = BytesMut::new(bytes);
13456        #[allow(clippy::absurd_extreme_comparisons)]
13457        #[allow(unused_comparisons)]
13458        if __tmp.remaining() < Self::ENCODED_LEN {
13459            panic!(
13460                "buffer is too small (need {} bytes, but got {})",
13461                Self::ENCODED_LEN,
13462                __tmp.remaining(),
13463            )
13464        }
13465        __tmp.put_u64_le(self.time_usec);
13466        __tmp.put_i32_le(self.lat);
13467        __tmp.put_i32_le(self.lon);
13468        __tmp.put_i32_le(self.alt);
13469        __tmp.put_i32_le(self.relative_alt);
13470        __tmp.put_f32_le(self.vx);
13471        __tmp.put_f32_le(self.vy);
13472        __tmp.put_f32_le(self.vz);
13473        for val in &self.covariance {
13474            __tmp.put_f32_le(*val);
13475        }
13476        __tmp.put_u8(self.estimator_type as u8);
13477        if matches!(version, MavlinkVersion::V2) {
13478            let len = __tmp.len();
13479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13480        } else {
13481            __tmp.len()
13482        }
13483    }
13484}
13485#[doc = "Global position/attitude estimate from a vision source."]
13486#[doc = ""]
13487#[doc = "ID: 101"]
13488#[derive(Debug, Clone, PartialEq)]
13489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13491#[cfg_attr(feature = "ts", derive(TS))]
13492#[cfg_attr(feature = "ts", ts(export))]
13493pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13494    #[doc = "Timestamp (UNIX time or since system boot)"]
13495    pub usec: u64,
13496    #[doc = "Global X position"]
13497    pub x: f32,
13498    #[doc = "Global Y position"]
13499    pub y: f32,
13500    #[doc = "Global Z position"]
13501    pub z: f32,
13502    #[doc = "Roll angle"]
13503    pub roll: f32,
13504    #[doc = "Pitch angle"]
13505    pub pitch: f32,
13506    #[doc = "Yaw angle"]
13507    pub yaw: f32,
13508    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13511    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13512    pub covariance: [f32; 21],
13513    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13514    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13515    pub reset_counter: u8,
13516}
13517impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13518    pub const ENCODED_LEN: usize = 117usize;
13519    pub const DEFAULT: Self = Self {
13520        usec: 0_u64,
13521        x: 0.0_f32,
13522        y: 0.0_f32,
13523        z: 0.0_f32,
13524        roll: 0.0_f32,
13525        pitch: 0.0_f32,
13526        yaw: 0.0_f32,
13527        covariance: [0.0_f32; 21usize],
13528        reset_counter: 0_u8,
13529    };
13530    #[cfg(feature = "arbitrary")]
13531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13532        use arbitrary::{Arbitrary, Unstructured};
13533        let mut buf = [0u8; 1024];
13534        rng.fill_bytes(&mut buf);
13535        let mut unstructured = Unstructured::new(&buf);
13536        Self::arbitrary(&mut unstructured).unwrap_or_default()
13537    }
13538}
13539impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13540    fn default() -> Self {
13541        Self::DEFAULT.clone()
13542    }
13543}
13544impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13545    type Message = MavMessage;
13546    const ID: u32 = 101u32;
13547    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13548    const EXTRA_CRC: u8 = 102u8;
13549    const ENCODED_LEN: usize = 117usize;
13550    fn deser(
13551        _version: MavlinkVersion,
13552        __input: &[u8],
13553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13554        let avail_len = __input.len();
13555        let mut payload_buf = [0; Self::ENCODED_LEN];
13556        let mut buf = if avail_len < Self::ENCODED_LEN {
13557            payload_buf[0..avail_len].copy_from_slice(__input);
13558            Bytes::new(&payload_buf)
13559        } else {
13560            Bytes::new(__input)
13561        };
13562        let mut __struct = Self::default();
13563        __struct.usec = buf.get_u64_le();
13564        __struct.x = buf.get_f32_le();
13565        __struct.y = buf.get_f32_le();
13566        __struct.z = buf.get_f32_le();
13567        __struct.roll = buf.get_f32_le();
13568        __struct.pitch = buf.get_f32_le();
13569        __struct.yaw = buf.get_f32_le();
13570        for v in &mut __struct.covariance {
13571            let val = buf.get_f32_le();
13572            *v = val;
13573        }
13574        __struct.reset_counter = buf.get_u8();
13575        Ok(__struct)
13576    }
13577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13578        let mut __tmp = BytesMut::new(bytes);
13579        #[allow(clippy::absurd_extreme_comparisons)]
13580        #[allow(unused_comparisons)]
13581        if __tmp.remaining() < Self::ENCODED_LEN {
13582            panic!(
13583                "buffer is too small (need {} bytes, but got {})",
13584                Self::ENCODED_LEN,
13585                __tmp.remaining(),
13586            )
13587        }
13588        __tmp.put_u64_le(self.usec);
13589        __tmp.put_f32_le(self.x);
13590        __tmp.put_f32_le(self.y);
13591        __tmp.put_f32_le(self.z);
13592        __tmp.put_f32_le(self.roll);
13593        __tmp.put_f32_le(self.pitch);
13594        __tmp.put_f32_le(self.yaw);
13595        if matches!(version, MavlinkVersion::V2) {
13596            for val in &self.covariance {
13597                __tmp.put_f32_le(*val);
13598            }
13599            __tmp.put_u8(self.reset_counter);
13600            let len = __tmp.len();
13601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13602        } else {
13603            __tmp.len()
13604        }
13605    }
13606}
13607#[doc = "Second GPS data."]
13608#[doc = ""]
13609#[doc = "ID: 124"]
13610#[derive(Debug, Clone, PartialEq)]
13611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13613#[cfg_attr(feature = "ts", derive(TS))]
13614#[cfg_attr(feature = "ts", ts(export))]
13615pub struct GPS2_RAW_DATA {
13616    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13617    pub time_usec: u64,
13618    #[doc = "Latitude (WGS84)"]
13619    pub lat: i32,
13620    #[doc = "Longitude (WGS84)"]
13621    pub lon: i32,
13622    #[doc = "Altitude (MSL). Positive for up."]
13623    pub alt: i32,
13624    #[doc = "Age of DGPS info"]
13625    pub dgps_age: u32,
13626    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13627    pub eph: u16,
13628    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13629    pub epv: u16,
13630    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13631    pub vel: u16,
13632    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13633    pub cog: u16,
13634    #[doc = "GPS fix type."]
13635    pub fix_type: GpsFixType,
13636    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13637    pub satellites_visible: u8,
13638    #[doc = "Number of DGPS satellites"]
13639    pub dgps_numch: u8,
13640    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13642    pub yaw: u16,
13643    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13645    pub alt_ellipsoid: i32,
13646    #[doc = "Position uncertainty."]
13647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13648    pub h_acc: u32,
13649    #[doc = "Altitude uncertainty."]
13650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13651    pub v_acc: u32,
13652    #[doc = "Speed uncertainty."]
13653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13654    pub vel_acc: u32,
13655    #[doc = "Heading / track uncertainty"]
13656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13657    pub hdg_acc: u32,
13658}
13659impl GPS2_RAW_DATA {
13660    pub const ENCODED_LEN: usize = 57usize;
13661    pub const DEFAULT: Self = Self {
13662        time_usec: 0_u64,
13663        lat: 0_i32,
13664        lon: 0_i32,
13665        alt: 0_i32,
13666        dgps_age: 0_u32,
13667        eph: 0_u16,
13668        epv: 0_u16,
13669        vel: 0_u16,
13670        cog: 0_u16,
13671        fix_type: GpsFixType::DEFAULT,
13672        satellites_visible: 0_u8,
13673        dgps_numch: 0_u8,
13674        yaw: 0_u16,
13675        alt_ellipsoid: 0_i32,
13676        h_acc: 0_u32,
13677        v_acc: 0_u32,
13678        vel_acc: 0_u32,
13679        hdg_acc: 0_u32,
13680    };
13681    #[cfg(feature = "arbitrary")]
13682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13683        use arbitrary::{Arbitrary, Unstructured};
13684        let mut buf = [0u8; 1024];
13685        rng.fill_bytes(&mut buf);
13686        let mut unstructured = Unstructured::new(&buf);
13687        Self::arbitrary(&mut unstructured).unwrap_or_default()
13688    }
13689}
13690impl Default for GPS2_RAW_DATA {
13691    fn default() -> Self {
13692        Self::DEFAULT.clone()
13693    }
13694}
13695impl MessageData for GPS2_RAW_DATA {
13696    type Message = MavMessage;
13697    const ID: u32 = 124u32;
13698    const NAME: &'static str = "GPS2_RAW";
13699    const EXTRA_CRC: u8 = 87u8;
13700    const ENCODED_LEN: usize = 57usize;
13701    fn deser(
13702        _version: MavlinkVersion,
13703        __input: &[u8],
13704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13705        let avail_len = __input.len();
13706        let mut payload_buf = [0; Self::ENCODED_LEN];
13707        let mut buf = if avail_len < Self::ENCODED_LEN {
13708            payload_buf[0..avail_len].copy_from_slice(__input);
13709            Bytes::new(&payload_buf)
13710        } else {
13711            Bytes::new(__input)
13712        };
13713        let mut __struct = Self::default();
13714        __struct.time_usec = buf.get_u64_le();
13715        __struct.lat = buf.get_i32_le();
13716        __struct.lon = buf.get_i32_le();
13717        __struct.alt = buf.get_i32_le();
13718        __struct.dgps_age = buf.get_u32_le();
13719        __struct.eph = buf.get_u16_le();
13720        __struct.epv = buf.get_u16_le();
13721        __struct.vel = buf.get_u16_le();
13722        __struct.cog = buf.get_u16_le();
13723        let tmp = buf.get_u8();
13724        __struct.fix_type =
13725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13726                enum_type: "GpsFixType",
13727                value: tmp as u64,
13728            })?;
13729        __struct.satellites_visible = buf.get_u8();
13730        __struct.dgps_numch = buf.get_u8();
13731        __struct.yaw = buf.get_u16_le();
13732        __struct.alt_ellipsoid = buf.get_i32_le();
13733        __struct.h_acc = buf.get_u32_le();
13734        __struct.v_acc = buf.get_u32_le();
13735        __struct.vel_acc = buf.get_u32_le();
13736        __struct.hdg_acc = buf.get_u32_le();
13737        Ok(__struct)
13738    }
13739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13740        let mut __tmp = BytesMut::new(bytes);
13741        #[allow(clippy::absurd_extreme_comparisons)]
13742        #[allow(unused_comparisons)]
13743        if __tmp.remaining() < Self::ENCODED_LEN {
13744            panic!(
13745                "buffer is too small (need {} bytes, but got {})",
13746                Self::ENCODED_LEN,
13747                __tmp.remaining(),
13748            )
13749        }
13750        __tmp.put_u64_le(self.time_usec);
13751        __tmp.put_i32_le(self.lat);
13752        __tmp.put_i32_le(self.lon);
13753        __tmp.put_i32_le(self.alt);
13754        __tmp.put_u32_le(self.dgps_age);
13755        __tmp.put_u16_le(self.eph);
13756        __tmp.put_u16_le(self.epv);
13757        __tmp.put_u16_le(self.vel);
13758        __tmp.put_u16_le(self.cog);
13759        __tmp.put_u8(self.fix_type as u8);
13760        __tmp.put_u8(self.satellites_visible);
13761        __tmp.put_u8(self.dgps_numch);
13762        if matches!(version, MavlinkVersion::V2) {
13763            __tmp.put_u16_le(self.yaw);
13764            __tmp.put_i32_le(self.alt_ellipsoid);
13765            __tmp.put_u32_le(self.h_acc);
13766            __tmp.put_u32_le(self.v_acc);
13767            __tmp.put_u32_le(self.vel_acc);
13768            __tmp.put_u32_le(self.hdg_acc);
13769            let len = __tmp.len();
13770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13771        } else {
13772            __tmp.len()
13773        }
13774    }
13775}
13776#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13777#[doc = ""]
13778#[doc = "ID: 128"]
13779#[derive(Debug, Clone, PartialEq)]
13780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13782#[cfg_attr(feature = "ts", derive(TS))]
13783#[cfg_attr(feature = "ts", ts(export))]
13784pub struct GPS2_RTK_DATA {
13785    #[doc = "Time since boot of last baseline message received."]
13786    pub time_last_baseline_ms: u32,
13787    #[doc = "GPS Time of Week of last baseline"]
13788    pub tow: u32,
13789    #[doc = "Current baseline in ECEF x or NED north component."]
13790    pub baseline_a_mm: i32,
13791    #[doc = "Current baseline in ECEF y or NED east component."]
13792    pub baseline_b_mm: i32,
13793    #[doc = "Current baseline in ECEF z or NED down component."]
13794    pub baseline_c_mm: i32,
13795    #[doc = "Current estimate of baseline accuracy."]
13796    pub accuracy: u32,
13797    #[doc = "Current number of integer ambiguity hypotheses."]
13798    pub iar_num_hypotheses: i32,
13799    #[doc = "GPS Week Number of last baseline"]
13800    pub wn: u16,
13801    #[doc = "Identification of connected RTK receiver."]
13802    pub rtk_receiver_id: u8,
13803    #[doc = "GPS-specific health report for RTK data."]
13804    pub rtk_health: u8,
13805    #[doc = "Rate of baseline messages being received by GPS"]
13806    pub rtk_rate: u8,
13807    #[doc = "Current number of sats used for RTK calculation."]
13808    pub nsats: u8,
13809    #[doc = "Coordinate system of baseline"]
13810    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13811}
13812impl GPS2_RTK_DATA {
13813    pub const ENCODED_LEN: usize = 35usize;
13814    pub const DEFAULT: Self = Self {
13815        time_last_baseline_ms: 0_u32,
13816        tow: 0_u32,
13817        baseline_a_mm: 0_i32,
13818        baseline_b_mm: 0_i32,
13819        baseline_c_mm: 0_i32,
13820        accuracy: 0_u32,
13821        iar_num_hypotheses: 0_i32,
13822        wn: 0_u16,
13823        rtk_receiver_id: 0_u8,
13824        rtk_health: 0_u8,
13825        rtk_rate: 0_u8,
13826        nsats: 0_u8,
13827        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13828    };
13829    #[cfg(feature = "arbitrary")]
13830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13831        use arbitrary::{Arbitrary, Unstructured};
13832        let mut buf = [0u8; 1024];
13833        rng.fill_bytes(&mut buf);
13834        let mut unstructured = Unstructured::new(&buf);
13835        Self::arbitrary(&mut unstructured).unwrap_or_default()
13836    }
13837}
13838impl Default for GPS2_RTK_DATA {
13839    fn default() -> Self {
13840        Self::DEFAULT.clone()
13841    }
13842}
13843impl MessageData for GPS2_RTK_DATA {
13844    type Message = MavMessage;
13845    const ID: u32 = 128u32;
13846    const NAME: &'static str = "GPS2_RTK";
13847    const EXTRA_CRC: u8 = 226u8;
13848    const ENCODED_LEN: usize = 35usize;
13849    fn deser(
13850        _version: MavlinkVersion,
13851        __input: &[u8],
13852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13853        let avail_len = __input.len();
13854        let mut payload_buf = [0; Self::ENCODED_LEN];
13855        let mut buf = if avail_len < Self::ENCODED_LEN {
13856            payload_buf[0..avail_len].copy_from_slice(__input);
13857            Bytes::new(&payload_buf)
13858        } else {
13859            Bytes::new(__input)
13860        };
13861        let mut __struct = Self::default();
13862        __struct.time_last_baseline_ms = buf.get_u32_le();
13863        __struct.tow = buf.get_u32_le();
13864        __struct.baseline_a_mm = buf.get_i32_le();
13865        __struct.baseline_b_mm = buf.get_i32_le();
13866        __struct.baseline_c_mm = buf.get_i32_le();
13867        __struct.accuracy = buf.get_u32_le();
13868        __struct.iar_num_hypotheses = buf.get_i32_le();
13869        __struct.wn = buf.get_u16_le();
13870        __struct.rtk_receiver_id = buf.get_u8();
13871        __struct.rtk_health = buf.get_u8();
13872        __struct.rtk_rate = buf.get_u8();
13873        __struct.nsats = buf.get_u8();
13874        let tmp = buf.get_u8();
13875        __struct.baseline_coords_type =
13876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13877                enum_type: "RtkBaselineCoordinateSystem",
13878                value: tmp as u64,
13879            })?;
13880        Ok(__struct)
13881    }
13882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13883        let mut __tmp = BytesMut::new(bytes);
13884        #[allow(clippy::absurd_extreme_comparisons)]
13885        #[allow(unused_comparisons)]
13886        if __tmp.remaining() < Self::ENCODED_LEN {
13887            panic!(
13888                "buffer is too small (need {} bytes, but got {})",
13889                Self::ENCODED_LEN,
13890                __tmp.remaining(),
13891            )
13892        }
13893        __tmp.put_u32_le(self.time_last_baseline_ms);
13894        __tmp.put_u32_le(self.tow);
13895        __tmp.put_i32_le(self.baseline_a_mm);
13896        __tmp.put_i32_le(self.baseline_b_mm);
13897        __tmp.put_i32_le(self.baseline_c_mm);
13898        __tmp.put_u32_le(self.accuracy);
13899        __tmp.put_i32_le(self.iar_num_hypotheses);
13900        __tmp.put_u16_le(self.wn);
13901        __tmp.put_u8(self.rtk_receiver_id);
13902        __tmp.put_u8(self.rtk_health);
13903        __tmp.put_u8(self.rtk_rate);
13904        __tmp.put_u8(self.nsats);
13905        __tmp.put_u8(self.baseline_coords_type as u8);
13906        if matches!(version, MavlinkVersion::V2) {
13907            let len = __tmp.len();
13908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13909        } else {
13910            __tmp.len()
13911        }
13912    }
13913}
13914#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13915#[doc = ""]
13916#[doc = "ID: 49"]
13917#[derive(Debug, Clone, PartialEq)]
13918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13920#[cfg_attr(feature = "ts", derive(TS))]
13921#[cfg_attr(feature = "ts", ts(export))]
13922pub struct GPS_GLOBAL_ORIGIN_DATA {
13923    #[doc = "Latitude (WGS84)"]
13924    pub latitude: i32,
13925    #[doc = "Longitude (WGS84)"]
13926    pub longitude: i32,
13927    #[doc = "Altitude (MSL). Positive for up."]
13928    pub altitude: i32,
13929    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13931    pub time_usec: u64,
13932}
13933impl GPS_GLOBAL_ORIGIN_DATA {
13934    pub const ENCODED_LEN: usize = 20usize;
13935    pub const DEFAULT: Self = Self {
13936        latitude: 0_i32,
13937        longitude: 0_i32,
13938        altitude: 0_i32,
13939        time_usec: 0_u64,
13940    };
13941    #[cfg(feature = "arbitrary")]
13942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13943        use arbitrary::{Arbitrary, Unstructured};
13944        let mut buf = [0u8; 1024];
13945        rng.fill_bytes(&mut buf);
13946        let mut unstructured = Unstructured::new(&buf);
13947        Self::arbitrary(&mut unstructured).unwrap_or_default()
13948    }
13949}
13950impl Default for GPS_GLOBAL_ORIGIN_DATA {
13951    fn default() -> Self {
13952        Self::DEFAULT.clone()
13953    }
13954}
13955impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13956    type Message = MavMessage;
13957    const ID: u32 = 49u32;
13958    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13959    const EXTRA_CRC: u8 = 39u8;
13960    const ENCODED_LEN: usize = 20usize;
13961    fn deser(
13962        _version: MavlinkVersion,
13963        __input: &[u8],
13964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13965        let avail_len = __input.len();
13966        let mut payload_buf = [0; Self::ENCODED_LEN];
13967        let mut buf = if avail_len < Self::ENCODED_LEN {
13968            payload_buf[0..avail_len].copy_from_slice(__input);
13969            Bytes::new(&payload_buf)
13970        } else {
13971            Bytes::new(__input)
13972        };
13973        let mut __struct = Self::default();
13974        __struct.latitude = buf.get_i32_le();
13975        __struct.longitude = buf.get_i32_le();
13976        __struct.altitude = buf.get_i32_le();
13977        __struct.time_usec = buf.get_u64_le();
13978        Ok(__struct)
13979    }
13980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13981        let mut __tmp = BytesMut::new(bytes);
13982        #[allow(clippy::absurd_extreme_comparisons)]
13983        #[allow(unused_comparisons)]
13984        if __tmp.remaining() < Self::ENCODED_LEN {
13985            panic!(
13986                "buffer is too small (need {} bytes, but got {})",
13987                Self::ENCODED_LEN,
13988                __tmp.remaining(),
13989            )
13990        }
13991        __tmp.put_i32_le(self.latitude);
13992        __tmp.put_i32_le(self.longitude);
13993        __tmp.put_i32_le(self.altitude);
13994        if matches!(version, MavlinkVersion::V2) {
13995            __tmp.put_u64_le(self.time_usec);
13996            let len = __tmp.len();
13997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13998        } else {
13999            __tmp.len()
14000        }
14001    }
14002}
14003#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14004#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14005#[doc = ""]
14006#[doc = "ID: 123"]
14007#[derive(Debug, Clone, PartialEq)]
14008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14010#[cfg_attr(feature = "ts", derive(TS))]
14011#[cfg_attr(feature = "ts", ts(export))]
14012pub struct GPS_INJECT_DATA_DATA {
14013    #[doc = "System ID"]
14014    pub target_system: u8,
14015    #[doc = "Component ID"]
14016    pub target_component: u8,
14017    #[doc = "Data length"]
14018    pub len: u8,
14019    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14020    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14021    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14022    pub data: [u8; 110],
14023}
14024impl GPS_INJECT_DATA_DATA {
14025    pub const ENCODED_LEN: usize = 113usize;
14026    pub const DEFAULT: Self = Self {
14027        target_system: 0_u8,
14028        target_component: 0_u8,
14029        len: 0_u8,
14030        data: [0_u8; 110usize],
14031    };
14032    #[cfg(feature = "arbitrary")]
14033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14034        use arbitrary::{Arbitrary, Unstructured};
14035        let mut buf = [0u8; 1024];
14036        rng.fill_bytes(&mut buf);
14037        let mut unstructured = Unstructured::new(&buf);
14038        Self::arbitrary(&mut unstructured).unwrap_or_default()
14039    }
14040}
14041impl Default for GPS_INJECT_DATA_DATA {
14042    fn default() -> Self {
14043        Self::DEFAULT.clone()
14044    }
14045}
14046impl MessageData for GPS_INJECT_DATA_DATA {
14047    type Message = MavMessage;
14048    const ID: u32 = 123u32;
14049    const NAME: &'static str = "GPS_INJECT_DATA";
14050    const EXTRA_CRC: u8 = 250u8;
14051    const ENCODED_LEN: usize = 113usize;
14052    fn deser(
14053        _version: MavlinkVersion,
14054        __input: &[u8],
14055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14056        let avail_len = __input.len();
14057        let mut payload_buf = [0; Self::ENCODED_LEN];
14058        let mut buf = if avail_len < Self::ENCODED_LEN {
14059            payload_buf[0..avail_len].copy_from_slice(__input);
14060            Bytes::new(&payload_buf)
14061        } else {
14062            Bytes::new(__input)
14063        };
14064        let mut __struct = Self::default();
14065        __struct.target_system = buf.get_u8();
14066        __struct.target_component = buf.get_u8();
14067        __struct.len = buf.get_u8();
14068        for v in &mut __struct.data {
14069            let val = buf.get_u8();
14070            *v = val;
14071        }
14072        Ok(__struct)
14073    }
14074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14075        let mut __tmp = BytesMut::new(bytes);
14076        #[allow(clippy::absurd_extreme_comparisons)]
14077        #[allow(unused_comparisons)]
14078        if __tmp.remaining() < Self::ENCODED_LEN {
14079            panic!(
14080                "buffer is too small (need {} bytes, but got {})",
14081                Self::ENCODED_LEN,
14082                __tmp.remaining(),
14083            )
14084        }
14085        __tmp.put_u8(self.target_system);
14086        __tmp.put_u8(self.target_component);
14087        __tmp.put_u8(self.len);
14088        for val in &self.data {
14089            __tmp.put_u8(*val);
14090        }
14091        if matches!(version, MavlinkVersion::V2) {
14092            let len = __tmp.len();
14093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14094        } else {
14095            __tmp.len()
14096        }
14097    }
14098}
14099#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14100#[doc = ""]
14101#[doc = "ID: 232"]
14102#[derive(Debug, Clone, PartialEq)]
14103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14105#[cfg_attr(feature = "ts", derive(TS))]
14106#[cfg_attr(feature = "ts", ts(export))]
14107pub struct GPS_INPUT_DATA {
14108    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14109    pub time_usec: u64,
14110    #[doc = "GPS time (from start of GPS week)"]
14111    pub time_week_ms: u32,
14112    #[doc = "Latitude (WGS84)"]
14113    pub lat: i32,
14114    #[doc = "Longitude (WGS84)"]
14115    pub lon: i32,
14116    #[doc = "Altitude (MSL). Positive for up."]
14117    pub alt: f32,
14118    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14119    pub hdop: f32,
14120    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14121    pub vdop: f32,
14122    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14123    pub vn: f32,
14124    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14125    pub ve: f32,
14126    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14127    pub vd: f32,
14128    #[doc = "GPS speed accuracy"]
14129    pub speed_accuracy: f32,
14130    #[doc = "GPS horizontal accuracy"]
14131    pub horiz_accuracy: f32,
14132    #[doc = "GPS vertical accuracy"]
14133    pub vert_accuracy: f32,
14134    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14135    pub ignore_flags: GpsInputIgnoreFlags,
14136    #[doc = "GPS week number"]
14137    pub time_week: u16,
14138    #[doc = "ID of the GPS for multiple GPS inputs"]
14139    pub gps_id: u8,
14140    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14141    pub fix_type: u8,
14142    #[doc = "Number of satellites visible."]
14143    pub satellites_visible: u8,
14144    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14145    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14146    pub yaw: u16,
14147}
14148impl GPS_INPUT_DATA {
14149    pub const ENCODED_LEN: usize = 65usize;
14150    pub const DEFAULT: Self = Self {
14151        time_usec: 0_u64,
14152        time_week_ms: 0_u32,
14153        lat: 0_i32,
14154        lon: 0_i32,
14155        alt: 0.0_f32,
14156        hdop: 0.0_f32,
14157        vdop: 0.0_f32,
14158        vn: 0.0_f32,
14159        ve: 0.0_f32,
14160        vd: 0.0_f32,
14161        speed_accuracy: 0.0_f32,
14162        horiz_accuracy: 0.0_f32,
14163        vert_accuracy: 0.0_f32,
14164        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14165        time_week: 0_u16,
14166        gps_id: 0_u8,
14167        fix_type: 0_u8,
14168        satellites_visible: 0_u8,
14169        yaw: 0_u16,
14170    };
14171    #[cfg(feature = "arbitrary")]
14172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14173        use arbitrary::{Arbitrary, Unstructured};
14174        let mut buf = [0u8; 1024];
14175        rng.fill_bytes(&mut buf);
14176        let mut unstructured = Unstructured::new(&buf);
14177        Self::arbitrary(&mut unstructured).unwrap_or_default()
14178    }
14179}
14180impl Default for GPS_INPUT_DATA {
14181    fn default() -> Self {
14182        Self::DEFAULT.clone()
14183    }
14184}
14185impl MessageData for GPS_INPUT_DATA {
14186    type Message = MavMessage;
14187    const ID: u32 = 232u32;
14188    const NAME: &'static str = "GPS_INPUT";
14189    const EXTRA_CRC: u8 = 151u8;
14190    const ENCODED_LEN: usize = 65usize;
14191    fn deser(
14192        _version: MavlinkVersion,
14193        __input: &[u8],
14194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14195        let avail_len = __input.len();
14196        let mut payload_buf = [0; Self::ENCODED_LEN];
14197        let mut buf = if avail_len < Self::ENCODED_LEN {
14198            payload_buf[0..avail_len].copy_from_slice(__input);
14199            Bytes::new(&payload_buf)
14200        } else {
14201            Bytes::new(__input)
14202        };
14203        let mut __struct = Self::default();
14204        __struct.time_usec = buf.get_u64_le();
14205        __struct.time_week_ms = buf.get_u32_le();
14206        __struct.lat = buf.get_i32_le();
14207        __struct.lon = buf.get_i32_le();
14208        __struct.alt = buf.get_f32_le();
14209        __struct.hdop = buf.get_f32_le();
14210        __struct.vdop = buf.get_f32_le();
14211        __struct.vn = buf.get_f32_le();
14212        __struct.ve = buf.get_f32_le();
14213        __struct.vd = buf.get_f32_le();
14214        __struct.speed_accuracy = buf.get_f32_le();
14215        __struct.horiz_accuracy = buf.get_f32_le();
14216        __struct.vert_accuracy = buf.get_f32_le();
14217        let tmp = buf.get_u16_le();
14218        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14219            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14220        )
14221        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14222            flag_type: "GpsInputIgnoreFlags",
14223            value: tmp as u64,
14224        })?;
14225        __struct.time_week = buf.get_u16_le();
14226        __struct.gps_id = buf.get_u8();
14227        __struct.fix_type = buf.get_u8();
14228        __struct.satellites_visible = buf.get_u8();
14229        __struct.yaw = buf.get_u16_le();
14230        Ok(__struct)
14231    }
14232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14233        let mut __tmp = BytesMut::new(bytes);
14234        #[allow(clippy::absurd_extreme_comparisons)]
14235        #[allow(unused_comparisons)]
14236        if __tmp.remaining() < Self::ENCODED_LEN {
14237            panic!(
14238                "buffer is too small (need {} bytes, but got {})",
14239                Self::ENCODED_LEN,
14240                __tmp.remaining(),
14241            )
14242        }
14243        __tmp.put_u64_le(self.time_usec);
14244        __tmp.put_u32_le(self.time_week_ms);
14245        __tmp.put_i32_le(self.lat);
14246        __tmp.put_i32_le(self.lon);
14247        __tmp.put_f32_le(self.alt);
14248        __tmp.put_f32_le(self.hdop);
14249        __tmp.put_f32_le(self.vdop);
14250        __tmp.put_f32_le(self.vn);
14251        __tmp.put_f32_le(self.ve);
14252        __tmp.put_f32_le(self.vd);
14253        __tmp.put_f32_le(self.speed_accuracy);
14254        __tmp.put_f32_le(self.horiz_accuracy);
14255        __tmp.put_f32_le(self.vert_accuracy);
14256        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14257        __tmp.put_u16_le(self.time_week);
14258        __tmp.put_u8(self.gps_id);
14259        __tmp.put_u8(self.fix_type);
14260        __tmp.put_u8(self.satellites_visible);
14261        if matches!(version, MavlinkVersion::V2) {
14262            __tmp.put_u16_le(self.yaw);
14263            let len = __tmp.len();
14264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14265        } else {
14266            __tmp.len()
14267        }
14268    }
14269}
14270#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14271#[doc = ""]
14272#[doc = "ID: 24"]
14273#[derive(Debug, Clone, PartialEq)]
14274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14276#[cfg_attr(feature = "ts", derive(TS))]
14277#[cfg_attr(feature = "ts", ts(export))]
14278pub struct GPS_RAW_INT_DATA {
14279    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14280    pub time_usec: u64,
14281    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14282    pub lat: i32,
14283    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14284    pub lon: i32,
14285    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14286    pub alt: i32,
14287    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14288    pub eph: u16,
14289    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14290    pub epv: u16,
14291    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14292    pub vel: u16,
14293    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14294    pub cog: u16,
14295    #[doc = "GPS fix type."]
14296    pub fix_type: GpsFixType,
14297    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14298    pub satellites_visible: u8,
14299    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14300    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14301    pub alt_ellipsoid: i32,
14302    #[doc = "Position uncertainty."]
14303    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14304    pub h_acc: u32,
14305    #[doc = "Altitude uncertainty."]
14306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14307    pub v_acc: u32,
14308    #[doc = "Speed uncertainty."]
14309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14310    pub vel_acc: u32,
14311    #[doc = "Heading / track uncertainty"]
14312    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14313    pub hdg_acc: u32,
14314    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14315    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14316    pub yaw: u16,
14317}
14318impl GPS_RAW_INT_DATA {
14319    pub const ENCODED_LEN: usize = 52usize;
14320    pub const DEFAULT: Self = Self {
14321        time_usec: 0_u64,
14322        lat: 0_i32,
14323        lon: 0_i32,
14324        alt: 0_i32,
14325        eph: 0_u16,
14326        epv: 0_u16,
14327        vel: 0_u16,
14328        cog: 0_u16,
14329        fix_type: GpsFixType::DEFAULT,
14330        satellites_visible: 0_u8,
14331        alt_ellipsoid: 0_i32,
14332        h_acc: 0_u32,
14333        v_acc: 0_u32,
14334        vel_acc: 0_u32,
14335        hdg_acc: 0_u32,
14336        yaw: 0_u16,
14337    };
14338    #[cfg(feature = "arbitrary")]
14339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14340        use arbitrary::{Arbitrary, Unstructured};
14341        let mut buf = [0u8; 1024];
14342        rng.fill_bytes(&mut buf);
14343        let mut unstructured = Unstructured::new(&buf);
14344        Self::arbitrary(&mut unstructured).unwrap_or_default()
14345    }
14346}
14347impl Default for GPS_RAW_INT_DATA {
14348    fn default() -> Self {
14349        Self::DEFAULT.clone()
14350    }
14351}
14352impl MessageData for GPS_RAW_INT_DATA {
14353    type Message = MavMessage;
14354    const ID: u32 = 24u32;
14355    const NAME: &'static str = "GPS_RAW_INT";
14356    const EXTRA_CRC: u8 = 24u8;
14357    const ENCODED_LEN: usize = 52usize;
14358    fn deser(
14359        _version: MavlinkVersion,
14360        __input: &[u8],
14361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14362        let avail_len = __input.len();
14363        let mut payload_buf = [0; Self::ENCODED_LEN];
14364        let mut buf = if avail_len < Self::ENCODED_LEN {
14365            payload_buf[0..avail_len].copy_from_slice(__input);
14366            Bytes::new(&payload_buf)
14367        } else {
14368            Bytes::new(__input)
14369        };
14370        let mut __struct = Self::default();
14371        __struct.time_usec = buf.get_u64_le();
14372        __struct.lat = buf.get_i32_le();
14373        __struct.lon = buf.get_i32_le();
14374        __struct.alt = buf.get_i32_le();
14375        __struct.eph = buf.get_u16_le();
14376        __struct.epv = buf.get_u16_le();
14377        __struct.vel = buf.get_u16_le();
14378        __struct.cog = buf.get_u16_le();
14379        let tmp = buf.get_u8();
14380        __struct.fix_type =
14381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14382                enum_type: "GpsFixType",
14383                value: tmp as u64,
14384            })?;
14385        __struct.satellites_visible = buf.get_u8();
14386        __struct.alt_ellipsoid = buf.get_i32_le();
14387        __struct.h_acc = buf.get_u32_le();
14388        __struct.v_acc = buf.get_u32_le();
14389        __struct.vel_acc = buf.get_u32_le();
14390        __struct.hdg_acc = buf.get_u32_le();
14391        __struct.yaw = buf.get_u16_le();
14392        Ok(__struct)
14393    }
14394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14395        let mut __tmp = BytesMut::new(bytes);
14396        #[allow(clippy::absurd_extreme_comparisons)]
14397        #[allow(unused_comparisons)]
14398        if __tmp.remaining() < Self::ENCODED_LEN {
14399            panic!(
14400                "buffer is too small (need {} bytes, but got {})",
14401                Self::ENCODED_LEN,
14402                __tmp.remaining(),
14403            )
14404        }
14405        __tmp.put_u64_le(self.time_usec);
14406        __tmp.put_i32_le(self.lat);
14407        __tmp.put_i32_le(self.lon);
14408        __tmp.put_i32_le(self.alt);
14409        __tmp.put_u16_le(self.eph);
14410        __tmp.put_u16_le(self.epv);
14411        __tmp.put_u16_le(self.vel);
14412        __tmp.put_u16_le(self.cog);
14413        __tmp.put_u8(self.fix_type as u8);
14414        __tmp.put_u8(self.satellites_visible);
14415        if matches!(version, MavlinkVersion::V2) {
14416            __tmp.put_i32_le(self.alt_ellipsoid);
14417            __tmp.put_u32_le(self.h_acc);
14418            __tmp.put_u32_le(self.v_acc);
14419            __tmp.put_u32_le(self.vel_acc);
14420            __tmp.put_u32_le(self.hdg_acc);
14421            __tmp.put_u16_le(self.yaw);
14422            let len = __tmp.len();
14423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14424        } else {
14425            __tmp.len()
14426        }
14427    }
14428}
14429#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14430#[doc = ""]
14431#[doc = "ID: 233"]
14432#[derive(Debug, Clone, PartialEq)]
14433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14435#[cfg_attr(feature = "ts", derive(TS))]
14436#[cfg_attr(feature = "ts", ts(export))]
14437pub struct GPS_RTCM_DATA_DATA {
14438    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14439    pub flags: u8,
14440    #[doc = "data length"]
14441    pub len: u8,
14442    #[doc = "RTCM message (may be fragmented)"]
14443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14444    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14445    pub data: [u8; 180],
14446}
14447impl GPS_RTCM_DATA_DATA {
14448    pub const ENCODED_LEN: usize = 182usize;
14449    pub const DEFAULT: Self = Self {
14450        flags: 0_u8,
14451        len: 0_u8,
14452        data: [0_u8; 180usize],
14453    };
14454    #[cfg(feature = "arbitrary")]
14455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14456        use arbitrary::{Arbitrary, Unstructured};
14457        let mut buf = [0u8; 1024];
14458        rng.fill_bytes(&mut buf);
14459        let mut unstructured = Unstructured::new(&buf);
14460        Self::arbitrary(&mut unstructured).unwrap_or_default()
14461    }
14462}
14463impl Default for GPS_RTCM_DATA_DATA {
14464    fn default() -> Self {
14465        Self::DEFAULT.clone()
14466    }
14467}
14468impl MessageData for GPS_RTCM_DATA_DATA {
14469    type Message = MavMessage;
14470    const ID: u32 = 233u32;
14471    const NAME: &'static str = "GPS_RTCM_DATA";
14472    const EXTRA_CRC: u8 = 35u8;
14473    const ENCODED_LEN: usize = 182usize;
14474    fn deser(
14475        _version: MavlinkVersion,
14476        __input: &[u8],
14477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14478        let avail_len = __input.len();
14479        let mut payload_buf = [0; Self::ENCODED_LEN];
14480        let mut buf = if avail_len < Self::ENCODED_LEN {
14481            payload_buf[0..avail_len].copy_from_slice(__input);
14482            Bytes::new(&payload_buf)
14483        } else {
14484            Bytes::new(__input)
14485        };
14486        let mut __struct = Self::default();
14487        __struct.flags = buf.get_u8();
14488        __struct.len = buf.get_u8();
14489        for v in &mut __struct.data {
14490            let val = buf.get_u8();
14491            *v = val;
14492        }
14493        Ok(__struct)
14494    }
14495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14496        let mut __tmp = BytesMut::new(bytes);
14497        #[allow(clippy::absurd_extreme_comparisons)]
14498        #[allow(unused_comparisons)]
14499        if __tmp.remaining() < Self::ENCODED_LEN {
14500            panic!(
14501                "buffer is too small (need {} bytes, but got {})",
14502                Self::ENCODED_LEN,
14503                __tmp.remaining(),
14504            )
14505        }
14506        __tmp.put_u8(self.flags);
14507        __tmp.put_u8(self.len);
14508        for val in &self.data {
14509            __tmp.put_u8(*val);
14510        }
14511        if matches!(version, MavlinkVersion::V2) {
14512            let len = __tmp.len();
14513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14514        } else {
14515            __tmp.len()
14516        }
14517    }
14518}
14519#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14520#[doc = ""]
14521#[doc = "ID: 127"]
14522#[derive(Debug, Clone, PartialEq)]
14523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14525#[cfg_attr(feature = "ts", derive(TS))]
14526#[cfg_attr(feature = "ts", ts(export))]
14527pub struct GPS_RTK_DATA {
14528    #[doc = "Time since boot of last baseline message received."]
14529    pub time_last_baseline_ms: u32,
14530    #[doc = "GPS Time of Week of last baseline"]
14531    pub tow: u32,
14532    #[doc = "Current baseline in ECEF x or NED north component."]
14533    pub baseline_a_mm: i32,
14534    #[doc = "Current baseline in ECEF y or NED east component."]
14535    pub baseline_b_mm: i32,
14536    #[doc = "Current baseline in ECEF z or NED down component."]
14537    pub baseline_c_mm: i32,
14538    #[doc = "Current estimate of baseline accuracy."]
14539    pub accuracy: u32,
14540    #[doc = "Current number of integer ambiguity hypotheses."]
14541    pub iar_num_hypotheses: i32,
14542    #[doc = "GPS Week Number of last baseline"]
14543    pub wn: u16,
14544    #[doc = "Identification of connected RTK receiver."]
14545    pub rtk_receiver_id: u8,
14546    #[doc = "GPS-specific health report for RTK data."]
14547    pub rtk_health: u8,
14548    #[doc = "Rate of baseline messages being received by GPS"]
14549    pub rtk_rate: u8,
14550    #[doc = "Current number of sats used for RTK calculation."]
14551    pub nsats: u8,
14552    #[doc = "Coordinate system of baseline"]
14553    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14554}
14555impl GPS_RTK_DATA {
14556    pub const ENCODED_LEN: usize = 35usize;
14557    pub const DEFAULT: Self = Self {
14558        time_last_baseline_ms: 0_u32,
14559        tow: 0_u32,
14560        baseline_a_mm: 0_i32,
14561        baseline_b_mm: 0_i32,
14562        baseline_c_mm: 0_i32,
14563        accuracy: 0_u32,
14564        iar_num_hypotheses: 0_i32,
14565        wn: 0_u16,
14566        rtk_receiver_id: 0_u8,
14567        rtk_health: 0_u8,
14568        rtk_rate: 0_u8,
14569        nsats: 0_u8,
14570        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14571    };
14572    #[cfg(feature = "arbitrary")]
14573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14574        use arbitrary::{Arbitrary, Unstructured};
14575        let mut buf = [0u8; 1024];
14576        rng.fill_bytes(&mut buf);
14577        let mut unstructured = Unstructured::new(&buf);
14578        Self::arbitrary(&mut unstructured).unwrap_or_default()
14579    }
14580}
14581impl Default for GPS_RTK_DATA {
14582    fn default() -> Self {
14583        Self::DEFAULT.clone()
14584    }
14585}
14586impl MessageData for GPS_RTK_DATA {
14587    type Message = MavMessage;
14588    const ID: u32 = 127u32;
14589    const NAME: &'static str = "GPS_RTK";
14590    const EXTRA_CRC: u8 = 25u8;
14591    const ENCODED_LEN: usize = 35usize;
14592    fn deser(
14593        _version: MavlinkVersion,
14594        __input: &[u8],
14595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14596        let avail_len = __input.len();
14597        let mut payload_buf = [0; Self::ENCODED_LEN];
14598        let mut buf = if avail_len < Self::ENCODED_LEN {
14599            payload_buf[0..avail_len].copy_from_slice(__input);
14600            Bytes::new(&payload_buf)
14601        } else {
14602            Bytes::new(__input)
14603        };
14604        let mut __struct = Self::default();
14605        __struct.time_last_baseline_ms = buf.get_u32_le();
14606        __struct.tow = buf.get_u32_le();
14607        __struct.baseline_a_mm = buf.get_i32_le();
14608        __struct.baseline_b_mm = buf.get_i32_le();
14609        __struct.baseline_c_mm = buf.get_i32_le();
14610        __struct.accuracy = buf.get_u32_le();
14611        __struct.iar_num_hypotheses = buf.get_i32_le();
14612        __struct.wn = buf.get_u16_le();
14613        __struct.rtk_receiver_id = buf.get_u8();
14614        __struct.rtk_health = buf.get_u8();
14615        __struct.rtk_rate = buf.get_u8();
14616        __struct.nsats = buf.get_u8();
14617        let tmp = buf.get_u8();
14618        __struct.baseline_coords_type =
14619            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14620                enum_type: "RtkBaselineCoordinateSystem",
14621                value: tmp as u64,
14622            })?;
14623        Ok(__struct)
14624    }
14625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14626        let mut __tmp = BytesMut::new(bytes);
14627        #[allow(clippy::absurd_extreme_comparisons)]
14628        #[allow(unused_comparisons)]
14629        if __tmp.remaining() < Self::ENCODED_LEN {
14630            panic!(
14631                "buffer is too small (need {} bytes, but got {})",
14632                Self::ENCODED_LEN,
14633                __tmp.remaining(),
14634            )
14635        }
14636        __tmp.put_u32_le(self.time_last_baseline_ms);
14637        __tmp.put_u32_le(self.tow);
14638        __tmp.put_i32_le(self.baseline_a_mm);
14639        __tmp.put_i32_le(self.baseline_b_mm);
14640        __tmp.put_i32_le(self.baseline_c_mm);
14641        __tmp.put_u32_le(self.accuracy);
14642        __tmp.put_i32_le(self.iar_num_hypotheses);
14643        __tmp.put_u16_le(self.wn);
14644        __tmp.put_u8(self.rtk_receiver_id);
14645        __tmp.put_u8(self.rtk_health);
14646        __tmp.put_u8(self.rtk_rate);
14647        __tmp.put_u8(self.nsats);
14648        __tmp.put_u8(self.baseline_coords_type as u8);
14649        if matches!(version, MavlinkVersion::V2) {
14650            let len = __tmp.len();
14651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14652        } else {
14653            __tmp.len()
14654        }
14655    }
14656}
14657#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14658#[doc = ""]
14659#[doc = "ID: 25"]
14660#[derive(Debug, Clone, PartialEq)]
14661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14663#[cfg_attr(feature = "ts", derive(TS))]
14664#[cfg_attr(feature = "ts", ts(export))]
14665pub struct GPS_STATUS_DATA {
14666    #[doc = "Number of satellites visible"]
14667    pub satellites_visible: u8,
14668    #[doc = "Global satellite ID"]
14669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14670    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14671    pub satellite_prn: [u8; 20],
14672    #[doc = "0: Satellite not used, 1: used for localization"]
14673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14675    pub satellite_used: [u8; 20],
14676    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14678    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14679    pub satellite_elevation: [u8; 20],
14680    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14682    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14683    pub satellite_azimuth: [u8; 20],
14684    #[doc = "Signal to noise ratio of satellite"]
14685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14687    pub satellite_snr: [u8; 20],
14688}
14689impl GPS_STATUS_DATA {
14690    pub const ENCODED_LEN: usize = 101usize;
14691    pub const DEFAULT: Self = Self {
14692        satellites_visible: 0_u8,
14693        satellite_prn: [0_u8; 20usize],
14694        satellite_used: [0_u8; 20usize],
14695        satellite_elevation: [0_u8; 20usize],
14696        satellite_azimuth: [0_u8; 20usize],
14697        satellite_snr: [0_u8; 20usize],
14698    };
14699    #[cfg(feature = "arbitrary")]
14700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14701        use arbitrary::{Arbitrary, Unstructured};
14702        let mut buf = [0u8; 1024];
14703        rng.fill_bytes(&mut buf);
14704        let mut unstructured = Unstructured::new(&buf);
14705        Self::arbitrary(&mut unstructured).unwrap_or_default()
14706    }
14707}
14708impl Default for GPS_STATUS_DATA {
14709    fn default() -> Self {
14710        Self::DEFAULT.clone()
14711    }
14712}
14713impl MessageData for GPS_STATUS_DATA {
14714    type Message = MavMessage;
14715    const ID: u32 = 25u32;
14716    const NAME: &'static str = "GPS_STATUS";
14717    const EXTRA_CRC: u8 = 23u8;
14718    const ENCODED_LEN: usize = 101usize;
14719    fn deser(
14720        _version: MavlinkVersion,
14721        __input: &[u8],
14722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14723        let avail_len = __input.len();
14724        let mut payload_buf = [0; Self::ENCODED_LEN];
14725        let mut buf = if avail_len < Self::ENCODED_LEN {
14726            payload_buf[0..avail_len].copy_from_slice(__input);
14727            Bytes::new(&payload_buf)
14728        } else {
14729            Bytes::new(__input)
14730        };
14731        let mut __struct = Self::default();
14732        __struct.satellites_visible = buf.get_u8();
14733        for v in &mut __struct.satellite_prn {
14734            let val = buf.get_u8();
14735            *v = val;
14736        }
14737        for v in &mut __struct.satellite_used {
14738            let val = buf.get_u8();
14739            *v = val;
14740        }
14741        for v in &mut __struct.satellite_elevation {
14742            let val = buf.get_u8();
14743            *v = val;
14744        }
14745        for v in &mut __struct.satellite_azimuth {
14746            let val = buf.get_u8();
14747            *v = val;
14748        }
14749        for v in &mut __struct.satellite_snr {
14750            let val = buf.get_u8();
14751            *v = val;
14752        }
14753        Ok(__struct)
14754    }
14755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14756        let mut __tmp = BytesMut::new(bytes);
14757        #[allow(clippy::absurd_extreme_comparisons)]
14758        #[allow(unused_comparisons)]
14759        if __tmp.remaining() < Self::ENCODED_LEN {
14760            panic!(
14761                "buffer is too small (need {} bytes, but got {})",
14762                Self::ENCODED_LEN,
14763                __tmp.remaining(),
14764            )
14765        }
14766        __tmp.put_u8(self.satellites_visible);
14767        for val in &self.satellite_prn {
14768            __tmp.put_u8(*val);
14769        }
14770        for val in &self.satellite_used {
14771            __tmp.put_u8(*val);
14772        }
14773        for val in &self.satellite_elevation {
14774            __tmp.put_u8(*val);
14775        }
14776        for val in &self.satellite_azimuth {
14777            __tmp.put_u8(*val);
14778        }
14779        for val in &self.satellite_snr {
14780            __tmp.put_u8(*val);
14781        }
14782        if matches!(version, MavlinkVersion::V2) {
14783            let len = __tmp.len();
14784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14785        } else {
14786            __tmp.len()
14787        }
14788    }
14789}
14790#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14791#[doc = ""]
14792#[doc = "ID: 0"]
14793#[derive(Debug, Clone, PartialEq)]
14794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14796#[cfg_attr(feature = "ts", derive(TS))]
14797#[cfg_attr(feature = "ts", ts(export))]
14798pub struct HEARTBEAT_DATA {
14799    #[doc = "A bitfield for use for autopilot-specific flags"]
14800    pub custom_mode: u32,
14801    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14802    pub mavtype: MavType,
14803    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14804    pub autopilot: MavAutopilot,
14805    #[doc = "System mode bitmap."]
14806    pub base_mode: MavModeFlag,
14807    #[doc = "System status flag."]
14808    pub system_status: MavState,
14809    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14810    pub mavlink_version: u8,
14811}
14812impl HEARTBEAT_DATA {
14813    pub const ENCODED_LEN: usize = 9usize;
14814    pub const DEFAULT: Self = Self {
14815        custom_mode: 0_u32,
14816        mavtype: MavType::DEFAULT,
14817        autopilot: MavAutopilot::DEFAULT,
14818        base_mode: MavModeFlag::DEFAULT,
14819        system_status: MavState::DEFAULT,
14820        mavlink_version: MINOR_MAVLINK_VERSION,
14821    };
14822    #[cfg(feature = "arbitrary")]
14823    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14824        use arbitrary::{Arbitrary, Unstructured};
14825        let mut buf = [0u8; 1024];
14826        rng.fill_bytes(&mut buf);
14827        let mut unstructured = Unstructured::new(&buf);
14828        Self::arbitrary(&mut unstructured).unwrap_or_default()
14829    }
14830}
14831impl Default for HEARTBEAT_DATA {
14832    fn default() -> Self {
14833        Self::DEFAULT.clone()
14834    }
14835}
14836impl MessageData for HEARTBEAT_DATA {
14837    type Message = MavMessage;
14838    const ID: u32 = 0u32;
14839    const NAME: &'static str = "HEARTBEAT";
14840    const EXTRA_CRC: u8 = 50u8;
14841    const ENCODED_LEN: usize = 9usize;
14842    fn deser(
14843        _version: MavlinkVersion,
14844        __input: &[u8],
14845    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14846        let avail_len = __input.len();
14847        let mut payload_buf = [0; Self::ENCODED_LEN];
14848        let mut buf = if avail_len < Self::ENCODED_LEN {
14849            payload_buf[0..avail_len].copy_from_slice(__input);
14850            Bytes::new(&payload_buf)
14851        } else {
14852            Bytes::new(__input)
14853        };
14854        let mut __struct = Self::default();
14855        __struct.custom_mode = buf.get_u32_le();
14856        let tmp = buf.get_u8();
14857        __struct.mavtype =
14858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14859                enum_type: "MavType",
14860                value: tmp as u64,
14861            })?;
14862        let tmp = buf.get_u8();
14863        __struct.autopilot =
14864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14865                enum_type: "MavAutopilot",
14866                value: tmp as u64,
14867            })?;
14868        let tmp = buf.get_u8();
14869        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
14870            ::mavlink_core::error::ParserError::InvalidFlag {
14871                flag_type: "MavModeFlag",
14872                value: tmp as u64,
14873            },
14874        )?;
14875        let tmp = buf.get_u8();
14876        __struct.system_status =
14877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14878                enum_type: "MavState",
14879                value: tmp as u64,
14880            })?;
14881        __struct.mavlink_version = buf.get_u8();
14882        Ok(__struct)
14883    }
14884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14885        let mut __tmp = BytesMut::new(bytes);
14886        #[allow(clippy::absurd_extreme_comparisons)]
14887        #[allow(unused_comparisons)]
14888        if __tmp.remaining() < Self::ENCODED_LEN {
14889            panic!(
14890                "buffer is too small (need {} bytes, but got {})",
14891                Self::ENCODED_LEN,
14892                __tmp.remaining(),
14893            )
14894        }
14895        __tmp.put_u32_le(self.custom_mode);
14896        __tmp.put_u8(self.mavtype as u8);
14897        __tmp.put_u8(self.autopilot as u8);
14898        __tmp.put_u8(self.base_mode.bits() as u8);
14899        __tmp.put_u8(self.system_status as u8);
14900        __tmp.put_u8(self.mavlink_version);
14901        if matches!(version, MavlinkVersion::V2) {
14902            let len = __tmp.len();
14903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14904        } else {
14905            __tmp.len()
14906        }
14907    }
14908}
14909#[doc = "The IMU readings in SI units in NED body frame."]
14910#[doc = ""]
14911#[doc = "ID: 105"]
14912#[derive(Debug, Clone, PartialEq)]
14913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14915#[cfg_attr(feature = "ts", derive(TS))]
14916#[cfg_attr(feature = "ts", ts(export))]
14917pub struct HIGHRES_IMU_DATA {
14918    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14919    pub time_usec: u64,
14920    #[doc = "X acceleration"]
14921    pub xacc: f32,
14922    #[doc = "Y acceleration"]
14923    pub yacc: f32,
14924    #[doc = "Z acceleration"]
14925    pub zacc: f32,
14926    #[doc = "Angular speed around X axis"]
14927    pub xgyro: f32,
14928    #[doc = "Angular speed around Y axis"]
14929    pub ygyro: f32,
14930    #[doc = "Angular speed around Z axis"]
14931    pub zgyro: f32,
14932    #[doc = "X Magnetic field"]
14933    pub xmag: f32,
14934    #[doc = "Y Magnetic field"]
14935    pub ymag: f32,
14936    #[doc = "Z Magnetic field"]
14937    pub zmag: f32,
14938    #[doc = "Absolute pressure"]
14939    pub abs_pressure: f32,
14940    #[doc = "Differential pressure"]
14941    pub diff_pressure: f32,
14942    #[doc = "Altitude calculated from pressure"]
14943    pub pressure_alt: f32,
14944    #[doc = "Temperature"]
14945    pub temperature: f32,
14946    #[doc = "Bitmap for fields that have updated since last message"]
14947    pub fields_updated: HighresImuUpdatedFlags,
14948    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14950    pub id: u8,
14951}
14952impl HIGHRES_IMU_DATA {
14953    pub const ENCODED_LEN: usize = 63usize;
14954    pub const DEFAULT: Self = Self {
14955        time_usec: 0_u64,
14956        xacc: 0.0_f32,
14957        yacc: 0.0_f32,
14958        zacc: 0.0_f32,
14959        xgyro: 0.0_f32,
14960        ygyro: 0.0_f32,
14961        zgyro: 0.0_f32,
14962        xmag: 0.0_f32,
14963        ymag: 0.0_f32,
14964        zmag: 0.0_f32,
14965        abs_pressure: 0.0_f32,
14966        diff_pressure: 0.0_f32,
14967        pressure_alt: 0.0_f32,
14968        temperature: 0.0_f32,
14969        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14970        id: 0_u8,
14971    };
14972    #[cfg(feature = "arbitrary")]
14973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14974        use arbitrary::{Arbitrary, Unstructured};
14975        let mut buf = [0u8; 1024];
14976        rng.fill_bytes(&mut buf);
14977        let mut unstructured = Unstructured::new(&buf);
14978        Self::arbitrary(&mut unstructured).unwrap_or_default()
14979    }
14980}
14981impl Default for HIGHRES_IMU_DATA {
14982    fn default() -> Self {
14983        Self::DEFAULT.clone()
14984    }
14985}
14986impl MessageData for HIGHRES_IMU_DATA {
14987    type Message = MavMessage;
14988    const ID: u32 = 105u32;
14989    const NAME: &'static str = "HIGHRES_IMU";
14990    const EXTRA_CRC: u8 = 93u8;
14991    const ENCODED_LEN: usize = 63usize;
14992    fn deser(
14993        _version: MavlinkVersion,
14994        __input: &[u8],
14995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14996        let avail_len = __input.len();
14997        let mut payload_buf = [0; Self::ENCODED_LEN];
14998        let mut buf = if avail_len < Self::ENCODED_LEN {
14999            payload_buf[0..avail_len].copy_from_slice(__input);
15000            Bytes::new(&payload_buf)
15001        } else {
15002            Bytes::new(__input)
15003        };
15004        let mut __struct = Self::default();
15005        __struct.time_usec = buf.get_u64_le();
15006        __struct.xacc = buf.get_f32_le();
15007        __struct.yacc = buf.get_f32_le();
15008        __struct.zacc = buf.get_f32_le();
15009        __struct.xgyro = buf.get_f32_le();
15010        __struct.ygyro = buf.get_f32_le();
15011        __struct.zgyro = buf.get_f32_le();
15012        __struct.xmag = buf.get_f32_le();
15013        __struct.ymag = buf.get_f32_le();
15014        __struct.zmag = buf.get_f32_le();
15015        __struct.abs_pressure = buf.get_f32_le();
15016        __struct.diff_pressure = buf.get_f32_le();
15017        __struct.pressure_alt = buf.get_f32_le();
15018        __struct.temperature = buf.get_f32_le();
15019        let tmp = buf.get_u16_le();
15020        __struct.fields_updated =
15021            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15022                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15023                    flag_type: "HighresImuUpdatedFlags",
15024                    value: tmp as u64,
15025                })?;
15026        __struct.id = buf.get_u8();
15027        Ok(__struct)
15028    }
15029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15030        let mut __tmp = BytesMut::new(bytes);
15031        #[allow(clippy::absurd_extreme_comparisons)]
15032        #[allow(unused_comparisons)]
15033        if __tmp.remaining() < Self::ENCODED_LEN {
15034            panic!(
15035                "buffer is too small (need {} bytes, but got {})",
15036                Self::ENCODED_LEN,
15037                __tmp.remaining(),
15038            )
15039        }
15040        __tmp.put_u64_le(self.time_usec);
15041        __tmp.put_f32_le(self.xacc);
15042        __tmp.put_f32_le(self.yacc);
15043        __tmp.put_f32_le(self.zacc);
15044        __tmp.put_f32_le(self.xgyro);
15045        __tmp.put_f32_le(self.ygyro);
15046        __tmp.put_f32_le(self.zgyro);
15047        __tmp.put_f32_le(self.xmag);
15048        __tmp.put_f32_le(self.ymag);
15049        __tmp.put_f32_le(self.zmag);
15050        __tmp.put_f32_le(self.abs_pressure);
15051        __tmp.put_f32_le(self.diff_pressure);
15052        __tmp.put_f32_le(self.pressure_alt);
15053        __tmp.put_f32_le(self.temperature);
15054        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15055        if matches!(version, MavlinkVersion::V2) {
15056            __tmp.put_u8(self.id);
15057            let len = __tmp.len();
15058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15059        } else {
15060            __tmp.len()
15061        }
15062    }
15063}
15064#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15065#[doc = "Message appropriate for high latency connections like Iridium."]
15066#[doc = ""]
15067#[doc = "ID: 234"]
15068#[derive(Debug, Clone, PartialEq)]
15069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15071#[cfg_attr(feature = "ts", derive(TS))]
15072#[cfg_attr(feature = "ts", ts(export))]
15073pub struct HIGH_LATENCY_DATA {
15074    #[doc = "A bitfield for use for autopilot-specific flags."]
15075    pub custom_mode: u32,
15076    #[doc = "Latitude"]
15077    pub latitude: i32,
15078    #[doc = "Longitude"]
15079    pub longitude: i32,
15080    #[doc = "roll"]
15081    pub roll: i16,
15082    #[doc = "pitch"]
15083    pub pitch: i16,
15084    #[doc = "heading"]
15085    pub heading: u16,
15086    #[doc = "heading setpoint"]
15087    pub heading_sp: i16,
15088    #[doc = "Altitude above mean sea level"]
15089    pub altitude_amsl: i16,
15090    #[doc = "Altitude setpoint relative to the home position"]
15091    pub altitude_sp: i16,
15092    #[doc = "distance to target"]
15093    pub wp_distance: u16,
15094    #[doc = "Bitmap of enabled system modes."]
15095    pub base_mode: MavModeFlag,
15096    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15097    pub landed_state: MavLandedState,
15098    #[doc = "throttle (percentage)"]
15099    pub throttle: i8,
15100    #[doc = "airspeed"]
15101    pub airspeed: u8,
15102    #[doc = "airspeed setpoint"]
15103    pub airspeed_sp: u8,
15104    #[doc = "groundspeed"]
15105    pub groundspeed: u8,
15106    #[doc = "climb rate"]
15107    pub climb_rate: i8,
15108    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15109    pub gps_nsat: u8,
15110    #[doc = "GPS Fix type."]
15111    pub gps_fix_type: GpsFixType,
15112    #[doc = "Remaining battery (percentage)"]
15113    pub battery_remaining: u8,
15114    #[doc = "Autopilot temperature (degrees C)"]
15115    pub temperature: i8,
15116    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15117    pub temperature_air: i8,
15118    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15119    pub failsafe: u8,
15120    #[doc = "current waypoint number"]
15121    pub wp_num: u8,
15122}
15123impl HIGH_LATENCY_DATA {
15124    pub const ENCODED_LEN: usize = 40usize;
15125    pub const DEFAULT: Self = Self {
15126        custom_mode: 0_u32,
15127        latitude: 0_i32,
15128        longitude: 0_i32,
15129        roll: 0_i16,
15130        pitch: 0_i16,
15131        heading: 0_u16,
15132        heading_sp: 0_i16,
15133        altitude_amsl: 0_i16,
15134        altitude_sp: 0_i16,
15135        wp_distance: 0_u16,
15136        base_mode: MavModeFlag::DEFAULT,
15137        landed_state: MavLandedState::DEFAULT,
15138        throttle: 0_i8,
15139        airspeed: 0_u8,
15140        airspeed_sp: 0_u8,
15141        groundspeed: 0_u8,
15142        climb_rate: 0_i8,
15143        gps_nsat: 0_u8,
15144        gps_fix_type: GpsFixType::DEFAULT,
15145        battery_remaining: 0_u8,
15146        temperature: 0_i8,
15147        temperature_air: 0_i8,
15148        failsafe: 0_u8,
15149        wp_num: 0_u8,
15150    };
15151    #[cfg(feature = "arbitrary")]
15152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15153        use arbitrary::{Arbitrary, Unstructured};
15154        let mut buf = [0u8; 1024];
15155        rng.fill_bytes(&mut buf);
15156        let mut unstructured = Unstructured::new(&buf);
15157        Self::arbitrary(&mut unstructured).unwrap_or_default()
15158    }
15159}
15160impl Default for HIGH_LATENCY_DATA {
15161    fn default() -> Self {
15162        Self::DEFAULT.clone()
15163    }
15164}
15165impl MessageData for HIGH_LATENCY_DATA {
15166    type Message = MavMessage;
15167    const ID: u32 = 234u32;
15168    const NAME: &'static str = "HIGH_LATENCY";
15169    const EXTRA_CRC: u8 = 150u8;
15170    const ENCODED_LEN: usize = 40usize;
15171    fn deser(
15172        _version: MavlinkVersion,
15173        __input: &[u8],
15174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15175        let avail_len = __input.len();
15176        let mut payload_buf = [0; Self::ENCODED_LEN];
15177        let mut buf = if avail_len < Self::ENCODED_LEN {
15178            payload_buf[0..avail_len].copy_from_slice(__input);
15179            Bytes::new(&payload_buf)
15180        } else {
15181            Bytes::new(__input)
15182        };
15183        let mut __struct = Self::default();
15184        __struct.custom_mode = buf.get_u32_le();
15185        __struct.latitude = buf.get_i32_le();
15186        __struct.longitude = buf.get_i32_le();
15187        __struct.roll = buf.get_i16_le();
15188        __struct.pitch = buf.get_i16_le();
15189        __struct.heading = buf.get_u16_le();
15190        __struct.heading_sp = buf.get_i16_le();
15191        __struct.altitude_amsl = buf.get_i16_le();
15192        __struct.altitude_sp = buf.get_i16_le();
15193        __struct.wp_distance = buf.get_u16_le();
15194        let tmp = buf.get_u8();
15195        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15196            ::mavlink_core::error::ParserError::InvalidFlag {
15197                flag_type: "MavModeFlag",
15198                value: tmp as u64,
15199            },
15200        )?;
15201        let tmp = buf.get_u8();
15202        __struct.landed_state =
15203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15204                enum_type: "MavLandedState",
15205                value: tmp as u64,
15206            })?;
15207        __struct.throttle = buf.get_i8();
15208        __struct.airspeed = buf.get_u8();
15209        __struct.airspeed_sp = buf.get_u8();
15210        __struct.groundspeed = buf.get_u8();
15211        __struct.climb_rate = buf.get_i8();
15212        __struct.gps_nsat = buf.get_u8();
15213        let tmp = buf.get_u8();
15214        __struct.gps_fix_type =
15215            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15216                enum_type: "GpsFixType",
15217                value: tmp as u64,
15218            })?;
15219        __struct.battery_remaining = buf.get_u8();
15220        __struct.temperature = buf.get_i8();
15221        __struct.temperature_air = buf.get_i8();
15222        __struct.failsafe = buf.get_u8();
15223        __struct.wp_num = buf.get_u8();
15224        Ok(__struct)
15225    }
15226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15227        let mut __tmp = BytesMut::new(bytes);
15228        #[allow(clippy::absurd_extreme_comparisons)]
15229        #[allow(unused_comparisons)]
15230        if __tmp.remaining() < Self::ENCODED_LEN {
15231            panic!(
15232                "buffer is too small (need {} bytes, but got {})",
15233                Self::ENCODED_LEN,
15234                __tmp.remaining(),
15235            )
15236        }
15237        __tmp.put_u32_le(self.custom_mode);
15238        __tmp.put_i32_le(self.latitude);
15239        __tmp.put_i32_le(self.longitude);
15240        __tmp.put_i16_le(self.roll);
15241        __tmp.put_i16_le(self.pitch);
15242        __tmp.put_u16_le(self.heading);
15243        __tmp.put_i16_le(self.heading_sp);
15244        __tmp.put_i16_le(self.altitude_amsl);
15245        __tmp.put_i16_le(self.altitude_sp);
15246        __tmp.put_u16_le(self.wp_distance);
15247        __tmp.put_u8(self.base_mode.bits() as u8);
15248        __tmp.put_u8(self.landed_state as u8);
15249        __tmp.put_i8(self.throttle);
15250        __tmp.put_u8(self.airspeed);
15251        __tmp.put_u8(self.airspeed_sp);
15252        __tmp.put_u8(self.groundspeed);
15253        __tmp.put_i8(self.climb_rate);
15254        __tmp.put_u8(self.gps_nsat);
15255        __tmp.put_u8(self.gps_fix_type as u8);
15256        __tmp.put_u8(self.battery_remaining);
15257        __tmp.put_i8(self.temperature);
15258        __tmp.put_i8(self.temperature_air);
15259        __tmp.put_u8(self.failsafe);
15260        __tmp.put_u8(self.wp_num);
15261        if matches!(version, MavlinkVersion::V2) {
15262            let len = __tmp.len();
15263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15264        } else {
15265            __tmp.len()
15266        }
15267    }
15268}
15269#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15270#[doc = ""]
15271#[doc = "ID: 235"]
15272#[derive(Debug, Clone, PartialEq)]
15273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15275#[cfg_attr(feature = "ts", derive(TS))]
15276#[cfg_attr(feature = "ts", ts(export))]
15277pub struct HIGH_LATENCY2_DATA {
15278    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15279    pub timestamp: u32,
15280    #[doc = "Latitude"]
15281    pub latitude: i32,
15282    #[doc = "Longitude"]
15283    pub longitude: i32,
15284    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15285    pub custom_mode: u16,
15286    #[doc = "Altitude above mean sea level"]
15287    pub altitude: i16,
15288    #[doc = "Altitude setpoint"]
15289    pub target_altitude: i16,
15290    #[doc = "Distance to target waypoint or position"]
15291    pub target_distance: u16,
15292    #[doc = "Current waypoint number"]
15293    pub wp_num: u16,
15294    #[doc = "Bitmap of failure flags."]
15295    pub failure_flags: HlFailureFlag,
15296    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15297    pub mavtype: MavType,
15298    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15299    pub autopilot: MavAutopilot,
15300    #[doc = "Heading"]
15301    pub heading: u8,
15302    #[doc = "Heading setpoint"]
15303    pub target_heading: u8,
15304    #[doc = "Throttle"]
15305    pub throttle: u8,
15306    #[doc = "Airspeed"]
15307    pub airspeed: u8,
15308    #[doc = "Airspeed setpoint"]
15309    pub airspeed_sp: u8,
15310    #[doc = "Groundspeed"]
15311    pub groundspeed: u8,
15312    #[doc = "Windspeed"]
15313    pub windspeed: u8,
15314    #[doc = "Wind heading"]
15315    pub wind_heading: u8,
15316    #[doc = "Maximum error horizontal position since last message"]
15317    pub eph: u8,
15318    #[doc = "Maximum error vertical position since last message"]
15319    pub epv: u8,
15320    #[doc = "Air temperature"]
15321    pub temperature_air: i8,
15322    #[doc = "Maximum climb rate magnitude since last message"]
15323    pub climb_rate: i8,
15324    #[doc = "Battery level (-1 if field not provided)."]
15325    pub battery: i8,
15326    #[doc = "Field for custom payload."]
15327    pub custom0: i8,
15328    #[doc = "Field for custom payload."]
15329    pub custom1: i8,
15330    #[doc = "Field for custom payload."]
15331    pub custom2: i8,
15332}
15333impl HIGH_LATENCY2_DATA {
15334    pub const ENCODED_LEN: usize = 42usize;
15335    pub const DEFAULT: Self = Self {
15336        timestamp: 0_u32,
15337        latitude: 0_i32,
15338        longitude: 0_i32,
15339        custom_mode: 0_u16,
15340        altitude: 0_i16,
15341        target_altitude: 0_i16,
15342        target_distance: 0_u16,
15343        wp_num: 0_u16,
15344        failure_flags: HlFailureFlag::DEFAULT,
15345        mavtype: MavType::DEFAULT,
15346        autopilot: MavAutopilot::DEFAULT,
15347        heading: 0_u8,
15348        target_heading: 0_u8,
15349        throttle: 0_u8,
15350        airspeed: 0_u8,
15351        airspeed_sp: 0_u8,
15352        groundspeed: 0_u8,
15353        windspeed: 0_u8,
15354        wind_heading: 0_u8,
15355        eph: 0_u8,
15356        epv: 0_u8,
15357        temperature_air: 0_i8,
15358        climb_rate: 0_i8,
15359        battery: 0_i8,
15360        custom0: 0_i8,
15361        custom1: 0_i8,
15362        custom2: 0_i8,
15363    };
15364    #[cfg(feature = "arbitrary")]
15365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15366        use arbitrary::{Arbitrary, Unstructured};
15367        let mut buf = [0u8; 1024];
15368        rng.fill_bytes(&mut buf);
15369        let mut unstructured = Unstructured::new(&buf);
15370        Self::arbitrary(&mut unstructured).unwrap_or_default()
15371    }
15372}
15373impl Default for HIGH_LATENCY2_DATA {
15374    fn default() -> Self {
15375        Self::DEFAULT.clone()
15376    }
15377}
15378impl MessageData for HIGH_LATENCY2_DATA {
15379    type Message = MavMessage;
15380    const ID: u32 = 235u32;
15381    const NAME: &'static str = "HIGH_LATENCY2";
15382    const EXTRA_CRC: u8 = 179u8;
15383    const ENCODED_LEN: usize = 42usize;
15384    fn deser(
15385        _version: MavlinkVersion,
15386        __input: &[u8],
15387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15388        let avail_len = __input.len();
15389        let mut payload_buf = [0; Self::ENCODED_LEN];
15390        let mut buf = if avail_len < Self::ENCODED_LEN {
15391            payload_buf[0..avail_len].copy_from_slice(__input);
15392            Bytes::new(&payload_buf)
15393        } else {
15394            Bytes::new(__input)
15395        };
15396        let mut __struct = Self::default();
15397        __struct.timestamp = buf.get_u32_le();
15398        __struct.latitude = buf.get_i32_le();
15399        __struct.longitude = buf.get_i32_le();
15400        __struct.custom_mode = buf.get_u16_le();
15401        __struct.altitude = buf.get_i16_le();
15402        __struct.target_altitude = buf.get_i16_le();
15403        __struct.target_distance = buf.get_u16_le();
15404        __struct.wp_num = buf.get_u16_le();
15405        let tmp = buf.get_u16_le();
15406        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15407            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15408                flag_type: "HlFailureFlag",
15409                value: tmp as u64,
15410            })?;
15411        let tmp = buf.get_u8();
15412        __struct.mavtype =
15413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15414                enum_type: "MavType",
15415                value: tmp as u64,
15416            })?;
15417        let tmp = buf.get_u8();
15418        __struct.autopilot =
15419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15420                enum_type: "MavAutopilot",
15421                value: tmp as u64,
15422            })?;
15423        __struct.heading = buf.get_u8();
15424        __struct.target_heading = buf.get_u8();
15425        __struct.throttle = buf.get_u8();
15426        __struct.airspeed = buf.get_u8();
15427        __struct.airspeed_sp = buf.get_u8();
15428        __struct.groundspeed = buf.get_u8();
15429        __struct.windspeed = buf.get_u8();
15430        __struct.wind_heading = buf.get_u8();
15431        __struct.eph = buf.get_u8();
15432        __struct.epv = buf.get_u8();
15433        __struct.temperature_air = buf.get_i8();
15434        __struct.climb_rate = buf.get_i8();
15435        __struct.battery = buf.get_i8();
15436        __struct.custom0 = buf.get_i8();
15437        __struct.custom1 = buf.get_i8();
15438        __struct.custom2 = buf.get_i8();
15439        Ok(__struct)
15440    }
15441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15442        let mut __tmp = BytesMut::new(bytes);
15443        #[allow(clippy::absurd_extreme_comparisons)]
15444        #[allow(unused_comparisons)]
15445        if __tmp.remaining() < Self::ENCODED_LEN {
15446            panic!(
15447                "buffer is too small (need {} bytes, but got {})",
15448                Self::ENCODED_LEN,
15449                __tmp.remaining(),
15450            )
15451        }
15452        __tmp.put_u32_le(self.timestamp);
15453        __tmp.put_i32_le(self.latitude);
15454        __tmp.put_i32_le(self.longitude);
15455        __tmp.put_u16_le(self.custom_mode);
15456        __tmp.put_i16_le(self.altitude);
15457        __tmp.put_i16_le(self.target_altitude);
15458        __tmp.put_u16_le(self.target_distance);
15459        __tmp.put_u16_le(self.wp_num);
15460        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15461        __tmp.put_u8(self.mavtype as u8);
15462        __tmp.put_u8(self.autopilot as u8);
15463        __tmp.put_u8(self.heading);
15464        __tmp.put_u8(self.target_heading);
15465        __tmp.put_u8(self.throttle);
15466        __tmp.put_u8(self.airspeed);
15467        __tmp.put_u8(self.airspeed_sp);
15468        __tmp.put_u8(self.groundspeed);
15469        __tmp.put_u8(self.windspeed);
15470        __tmp.put_u8(self.wind_heading);
15471        __tmp.put_u8(self.eph);
15472        __tmp.put_u8(self.epv);
15473        __tmp.put_i8(self.temperature_air);
15474        __tmp.put_i8(self.climb_rate);
15475        __tmp.put_i8(self.battery);
15476        __tmp.put_i8(self.custom0);
15477        __tmp.put_i8(self.custom1);
15478        __tmp.put_i8(self.custom2);
15479        if matches!(version, MavlinkVersion::V2) {
15480            let len = __tmp.len();
15481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15482        } else {
15483            __tmp.len()
15484        }
15485    }
15486}
15487#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15488#[doc = ""]
15489#[doc = "ID: 93"]
15490#[derive(Debug, Clone, PartialEq)]
15491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15493#[cfg_attr(feature = "ts", derive(TS))]
15494#[cfg_attr(feature = "ts", ts(export))]
15495pub struct HIL_ACTUATOR_CONTROLS_DATA {
15496    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15497    pub time_usec: u64,
15498    #[doc = "Flags bitmask."]
15499    pub flags: HilActuatorControlsFlags,
15500    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15502    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15503    pub controls: [f32; 16],
15504    #[doc = "System mode. Includes arming state."]
15505    pub mode: MavModeFlag,
15506}
15507impl HIL_ACTUATOR_CONTROLS_DATA {
15508    pub const ENCODED_LEN: usize = 81usize;
15509    pub const DEFAULT: Self = Self {
15510        time_usec: 0_u64,
15511        flags: HilActuatorControlsFlags::DEFAULT,
15512        controls: [0.0_f32; 16usize],
15513        mode: MavModeFlag::DEFAULT,
15514    };
15515    #[cfg(feature = "arbitrary")]
15516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15517        use arbitrary::{Arbitrary, Unstructured};
15518        let mut buf = [0u8; 1024];
15519        rng.fill_bytes(&mut buf);
15520        let mut unstructured = Unstructured::new(&buf);
15521        Self::arbitrary(&mut unstructured).unwrap_or_default()
15522    }
15523}
15524impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15525    fn default() -> Self {
15526        Self::DEFAULT.clone()
15527    }
15528}
15529impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15530    type Message = MavMessage;
15531    const ID: u32 = 93u32;
15532    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15533    const EXTRA_CRC: u8 = 47u8;
15534    const ENCODED_LEN: usize = 81usize;
15535    fn deser(
15536        _version: MavlinkVersion,
15537        __input: &[u8],
15538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15539        let avail_len = __input.len();
15540        let mut payload_buf = [0; Self::ENCODED_LEN];
15541        let mut buf = if avail_len < Self::ENCODED_LEN {
15542            payload_buf[0..avail_len].copy_from_slice(__input);
15543            Bytes::new(&payload_buf)
15544        } else {
15545            Bytes::new(__input)
15546        };
15547        let mut __struct = Self::default();
15548        __struct.time_usec = buf.get_u64_le();
15549        let tmp = buf.get_u64_le();
15550        __struct.flags =
15551            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
15552                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15553                flag_type: "HilActuatorControlsFlags",
15554                value: tmp as u64,
15555            })?;
15556        for v in &mut __struct.controls {
15557            let val = buf.get_f32_le();
15558            *v = val;
15559        }
15560        let tmp = buf.get_u8();
15561        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15562            ::mavlink_core::error::ParserError::InvalidFlag {
15563                flag_type: "MavModeFlag",
15564                value: tmp as u64,
15565            },
15566        )?;
15567        Ok(__struct)
15568    }
15569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15570        let mut __tmp = BytesMut::new(bytes);
15571        #[allow(clippy::absurd_extreme_comparisons)]
15572        #[allow(unused_comparisons)]
15573        if __tmp.remaining() < Self::ENCODED_LEN {
15574            panic!(
15575                "buffer is too small (need {} bytes, but got {})",
15576                Self::ENCODED_LEN,
15577                __tmp.remaining(),
15578            )
15579        }
15580        __tmp.put_u64_le(self.time_usec);
15581        __tmp.put_u64_le(self.flags.bits() as u64);
15582        for val in &self.controls {
15583            __tmp.put_f32_le(*val);
15584        }
15585        __tmp.put_u8(self.mode.bits() as u8);
15586        if matches!(version, MavlinkVersion::V2) {
15587            let len = __tmp.len();
15588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15589        } else {
15590            __tmp.len()
15591        }
15592    }
15593}
15594#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15595#[doc = ""]
15596#[doc = "ID: 91"]
15597#[derive(Debug, Clone, PartialEq)]
15598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15600#[cfg_attr(feature = "ts", derive(TS))]
15601#[cfg_attr(feature = "ts", ts(export))]
15602pub struct HIL_CONTROLS_DATA {
15603    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15604    pub time_usec: u64,
15605    #[doc = "Control output -1 .. 1"]
15606    pub roll_ailerons: f32,
15607    #[doc = "Control output -1 .. 1"]
15608    pub pitch_elevator: f32,
15609    #[doc = "Control output -1 .. 1"]
15610    pub yaw_rudder: f32,
15611    #[doc = "Throttle 0 .. 1"]
15612    pub throttle: f32,
15613    #[doc = "Aux 1, -1 .. 1"]
15614    pub aux1: f32,
15615    #[doc = "Aux 2, -1 .. 1"]
15616    pub aux2: f32,
15617    #[doc = "Aux 3, -1 .. 1"]
15618    pub aux3: f32,
15619    #[doc = "Aux 4, -1 .. 1"]
15620    pub aux4: f32,
15621    #[doc = "System mode."]
15622    pub mode: MavMode,
15623    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15624    pub nav_mode: u8,
15625}
15626impl HIL_CONTROLS_DATA {
15627    pub const ENCODED_LEN: usize = 42usize;
15628    pub const DEFAULT: Self = Self {
15629        time_usec: 0_u64,
15630        roll_ailerons: 0.0_f32,
15631        pitch_elevator: 0.0_f32,
15632        yaw_rudder: 0.0_f32,
15633        throttle: 0.0_f32,
15634        aux1: 0.0_f32,
15635        aux2: 0.0_f32,
15636        aux3: 0.0_f32,
15637        aux4: 0.0_f32,
15638        mode: MavMode::DEFAULT,
15639        nav_mode: 0_u8,
15640    };
15641    #[cfg(feature = "arbitrary")]
15642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15643        use arbitrary::{Arbitrary, Unstructured};
15644        let mut buf = [0u8; 1024];
15645        rng.fill_bytes(&mut buf);
15646        let mut unstructured = Unstructured::new(&buf);
15647        Self::arbitrary(&mut unstructured).unwrap_or_default()
15648    }
15649}
15650impl Default for HIL_CONTROLS_DATA {
15651    fn default() -> Self {
15652        Self::DEFAULT.clone()
15653    }
15654}
15655impl MessageData for HIL_CONTROLS_DATA {
15656    type Message = MavMessage;
15657    const ID: u32 = 91u32;
15658    const NAME: &'static str = "HIL_CONTROLS";
15659    const EXTRA_CRC: u8 = 63u8;
15660    const ENCODED_LEN: usize = 42usize;
15661    fn deser(
15662        _version: MavlinkVersion,
15663        __input: &[u8],
15664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15665        let avail_len = __input.len();
15666        let mut payload_buf = [0; Self::ENCODED_LEN];
15667        let mut buf = if avail_len < Self::ENCODED_LEN {
15668            payload_buf[0..avail_len].copy_from_slice(__input);
15669            Bytes::new(&payload_buf)
15670        } else {
15671            Bytes::new(__input)
15672        };
15673        let mut __struct = Self::default();
15674        __struct.time_usec = buf.get_u64_le();
15675        __struct.roll_ailerons = buf.get_f32_le();
15676        __struct.pitch_elevator = buf.get_f32_le();
15677        __struct.yaw_rudder = buf.get_f32_le();
15678        __struct.throttle = buf.get_f32_le();
15679        __struct.aux1 = buf.get_f32_le();
15680        __struct.aux2 = buf.get_f32_le();
15681        __struct.aux3 = buf.get_f32_le();
15682        __struct.aux4 = buf.get_f32_le();
15683        let tmp = buf.get_u8();
15684        __struct.mode =
15685            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15686                enum_type: "MavMode",
15687                value: tmp as u64,
15688            })?;
15689        __struct.nav_mode = buf.get_u8();
15690        Ok(__struct)
15691    }
15692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15693        let mut __tmp = BytesMut::new(bytes);
15694        #[allow(clippy::absurd_extreme_comparisons)]
15695        #[allow(unused_comparisons)]
15696        if __tmp.remaining() < Self::ENCODED_LEN {
15697            panic!(
15698                "buffer is too small (need {} bytes, but got {})",
15699                Self::ENCODED_LEN,
15700                __tmp.remaining(),
15701            )
15702        }
15703        __tmp.put_u64_le(self.time_usec);
15704        __tmp.put_f32_le(self.roll_ailerons);
15705        __tmp.put_f32_le(self.pitch_elevator);
15706        __tmp.put_f32_le(self.yaw_rudder);
15707        __tmp.put_f32_le(self.throttle);
15708        __tmp.put_f32_le(self.aux1);
15709        __tmp.put_f32_le(self.aux2);
15710        __tmp.put_f32_le(self.aux3);
15711        __tmp.put_f32_le(self.aux4);
15712        __tmp.put_u8(self.mode as u8);
15713        __tmp.put_u8(self.nav_mode);
15714        if matches!(version, MavlinkVersion::V2) {
15715            let len = __tmp.len();
15716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15717        } else {
15718            __tmp.len()
15719        }
15720    }
15721}
15722#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15723#[doc = ""]
15724#[doc = "ID: 113"]
15725#[derive(Debug, Clone, PartialEq)]
15726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15728#[cfg_attr(feature = "ts", derive(TS))]
15729#[cfg_attr(feature = "ts", ts(export))]
15730pub struct HIL_GPS_DATA {
15731    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15732    pub time_usec: u64,
15733    #[doc = "Latitude (WGS84)"]
15734    pub lat: i32,
15735    #[doc = "Longitude (WGS84)"]
15736    pub lon: i32,
15737    #[doc = "Altitude (MSL). Positive for up."]
15738    pub alt: i32,
15739    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15740    pub eph: u16,
15741    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15742    pub epv: u16,
15743    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15744    pub vel: u16,
15745    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15746    pub vn: i16,
15747    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15748    pub ve: i16,
15749    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15750    pub vd: i16,
15751    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15752    pub cog: u16,
15753    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15754    pub fix_type: u8,
15755    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15756    pub satellites_visible: u8,
15757    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15759    pub id: u8,
15760    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15761    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15762    pub yaw: u16,
15763}
15764impl HIL_GPS_DATA {
15765    pub const ENCODED_LEN: usize = 39usize;
15766    pub const DEFAULT: Self = Self {
15767        time_usec: 0_u64,
15768        lat: 0_i32,
15769        lon: 0_i32,
15770        alt: 0_i32,
15771        eph: 0_u16,
15772        epv: 0_u16,
15773        vel: 0_u16,
15774        vn: 0_i16,
15775        ve: 0_i16,
15776        vd: 0_i16,
15777        cog: 0_u16,
15778        fix_type: 0_u8,
15779        satellites_visible: 0_u8,
15780        id: 0_u8,
15781        yaw: 0_u16,
15782    };
15783    #[cfg(feature = "arbitrary")]
15784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15785        use arbitrary::{Arbitrary, Unstructured};
15786        let mut buf = [0u8; 1024];
15787        rng.fill_bytes(&mut buf);
15788        let mut unstructured = Unstructured::new(&buf);
15789        Self::arbitrary(&mut unstructured).unwrap_or_default()
15790    }
15791}
15792impl Default for HIL_GPS_DATA {
15793    fn default() -> Self {
15794        Self::DEFAULT.clone()
15795    }
15796}
15797impl MessageData for HIL_GPS_DATA {
15798    type Message = MavMessage;
15799    const ID: u32 = 113u32;
15800    const NAME: &'static str = "HIL_GPS";
15801    const EXTRA_CRC: u8 = 124u8;
15802    const ENCODED_LEN: usize = 39usize;
15803    fn deser(
15804        _version: MavlinkVersion,
15805        __input: &[u8],
15806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15807        let avail_len = __input.len();
15808        let mut payload_buf = [0; Self::ENCODED_LEN];
15809        let mut buf = if avail_len < Self::ENCODED_LEN {
15810            payload_buf[0..avail_len].copy_from_slice(__input);
15811            Bytes::new(&payload_buf)
15812        } else {
15813            Bytes::new(__input)
15814        };
15815        let mut __struct = Self::default();
15816        __struct.time_usec = buf.get_u64_le();
15817        __struct.lat = buf.get_i32_le();
15818        __struct.lon = buf.get_i32_le();
15819        __struct.alt = buf.get_i32_le();
15820        __struct.eph = buf.get_u16_le();
15821        __struct.epv = buf.get_u16_le();
15822        __struct.vel = buf.get_u16_le();
15823        __struct.vn = buf.get_i16_le();
15824        __struct.ve = buf.get_i16_le();
15825        __struct.vd = buf.get_i16_le();
15826        __struct.cog = buf.get_u16_le();
15827        __struct.fix_type = buf.get_u8();
15828        __struct.satellites_visible = buf.get_u8();
15829        __struct.id = buf.get_u8();
15830        __struct.yaw = buf.get_u16_le();
15831        Ok(__struct)
15832    }
15833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15834        let mut __tmp = BytesMut::new(bytes);
15835        #[allow(clippy::absurd_extreme_comparisons)]
15836        #[allow(unused_comparisons)]
15837        if __tmp.remaining() < Self::ENCODED_LEN {
15838            panic!(
15839                "buffer is too small (need {} bytes, but got {})",
15840                Self::ENCODED_LEN,
15841                __tmp.remaining(),
15842            )
15843        }
15844        __tmp.put_u64_le(self.time_usec);
15845        __tmp.put_i32_le(self.lat);
15846        __tmp.put_i32_le(self.lon);
15847        __tmp.put_i32_le(self.alt);
15848        __tmp.put_u16_le(self.eph);
15849        __tmp.put_u16_le(self.epv);
15850        __tmp.put_u16_le(self.vel);
15851        __tmp.put_i16_le(self.vn);
15852        __tmp.put_i16_le(self.ve);
15853        __tmp.put_i16_le(self.vd);
15854        __tmp.put_u16_le(self.cog);
15855        __tmp.put_u8(self.fix_type);
15856        __tmp.put_u8(self.satellites_visible);
15857        if matches!(version, MavlinkVersion::V2) {
15858            __tmp.put_u8(self.id);
15859            __tmp.put_u16_le(self.yaw);
15860            let len = __tmp.len();
15861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15862        } else {
15863            __tmp.len()
15864        }
15865    }
15866}
15867#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15868#[doc = ""]
15869#[doc = "ID: 114"]
15870#[derive(Debug, Clone, PartialEq)]
15871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15873#[cfg_attr(feature = "ts", derive(TS))]
15874#[cfg_attr(feature = "ts", ts(export))]
15875pub struct HIL_OPTICAL_FLOW_DATA {
15876    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15877    pub time_usec: u64,
15878    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15879    pub integration_time_us: u32,
15880    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15881    pub integrated_x: f32,
15882    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15883    pub integrated_y: f32,
15884    #[doc = "RH rotation around X axis"]
15885    pub integrated_xgyro: f32,
15886    #[doc = "RH rotation around Y axis"]
15887    pub integrated_ygyro: f32,
15888    #[doc = "RH rotation around Z axis"]
15889    pub integrated_zgyro: f32,
15890    #[doc = "Time since the distance was sampled."]
15891    pub time_delta_distance_us: u32,
15892    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15893    pub distance: f32,
15894    #[doc = "Temperature"]
15895    pub temperature: i16,
15896    #[doc = "Sensor ID"]
15897    pub sensor_id: u8,
15898    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15899    pub quality: u8,
15900}
15901impl HIL_OPTICAL_FLOW_DATA {
15902    pub const ENCODED_LEN: usize = 44usize;
15903    pub const DEFAULT: Self = Self {
15904        time_usec: 0_u64,
15905        integration_time_us: 0_u32,
15906        integrated_x: 0.0_f32,
15907        integrated_y: 0.0_f32,
15908        integrated_xgyro: 0.0_f32,
15909        integrated_ygyro: 0.0_f32,
15910        integrated_zgyro: 0.0_f32,
15911        time_delta_distance_us: 0_u32,
15912        distance: 0.0_f32,
15913        temperature: 0_i16,
15914        sensor_id: 0_u8,
15915        quality: 0_u8,
15916    };
15917    #[cfg(feature = "arbitrary")]
15918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15919        use arbitrary::{Arbitrary, Unstructured};
15920        let mut buf = [0u8; 1024];
15921        rng.fill_bytes(&mut buf);
15922        let mut unstructured = Unstructured::new(&buf);
15923        Self::arbitrary(&mut unstructured).unwrap_or_default()
15924    }
15925}
15926impl Default for HIL_OPTICAL_FLOW_DATA {
15927    fn default() -> Self {
15928        Self::DEFAULT.clone()
15929    }
15930}
15931impl MessageData for HIL_OPTICAL_FLOW_DATA {
15932    type Message = MavMessage;
15933    const ID: u32 = 114u32;
15934    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15935    const EXTRA_CRC: u8 = 237u8;
15936    const ENCODED_LEN: usize = 44usize;
15937    fn deser(
15938        _version: MavlinkVersion,
15939        __input: &[u8],
15940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15941        let avail_len = __input.len();
15942        let mut payload_buf = [0; Self::ENCODED_LEN];
15943        let mut buf = if avail_len < Self::ENCODED_LEN {
15944            payload_buf[0..avail_len].copy_from_slice(__input);
15945            Bytes::new(&payload_buf)
15946        } else {
15947            Bytes::new(__input)
15948        };
15949        let mut __struct = Self::default();
15950        __struct.time_usec = buf.get_u64_le();
15951        __struct.integration_time_us = buf.get_u32_le();
15952        __struct.integrated_x = buf.get_f32_le();
15953        __struct.integrated_y = buf.get_f32_le();
15954        __struct.integrated_xgyro = buf.get_f32_le();
15955        __struct.integrated_ygyro = buf.get_f32_le();
15956        __struct.integrated_zgyro = buf.get_f32_le();
15957        __struct.time_delta_distance_us = buf.get_u32_le();
15958        __struct.distance = buf.get_f32_le();
15959        __struct.temperature = buf.get_i16_le();
15960        __struct.sensor_id = buf.get_u8();
15961        __struct.quality = buf.get_u8();
15962        Ok(__struct)
15963    }
15964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15965        let mut __tmp = BytesMut::new(bytes);
15966        #[allow(clippy::absurd_extreme_comparisons)]
15967        #[allow(unused_comparisons)]
15968        if __tmp.remaining() < Self::ENCODED_LEN {
15969            panic!(
15970                "buffer is too small (need {} bytes, but got {})",
15971                Self::ENCODED_LEN,
15972                __tmp.remaining(),
15973            )
15974        }
15975        __tmp.put_u64_le(self.time_usec);
15976        __tmp.put_u32_le(self.integration_time_us);
15977        __tmp.put_f32_le(self.integrated_x);
15978        __tmp.put_f32_le(self.integrated_y);
15979        __tmp.put_f32_le(self.integrated_xgyro);
15980        __tmp.put_f32_le(self.integrated_ygyro);
15981        __tmp.put_f32_le(self.integrated_zgyro);
15982        __tmp.put_u32_le(self.time_delta_distance_us);
15983        __tmp.put_f32_le(self.distance);
15984        __tmp.put_i16_le(self.temperature);
15985        __tmp.put_u8(self.sensor_id);
15986        __tmp.put_u8(self.quality);
15987        if matches!(version, MavlinkVersion::V2) {
15988            let len = __tmp.len();
15989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15990        } else {
15991            __tmp.len()
15992        }
15993    }
15994}
15995#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15996#[doc = ""]
15997#[doc = "ID: 92"]
15998#[derive(Debug, Clone, PartialEq)]
15999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16001#[cfg_attr(feature = "ts", derive(TS))]
16002#[cfg_attr(feature = "ts", ts(export))]
16003pub struct HIL_RC_INPUTS_RAW_DATA {
16004    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16005    pub time_usec: u64,
16006    #[doc = "RC channel 1 value"]
16007    pub chan1_raw: u16,
16008    #[doc = "RC channel 2 value"]
16009    pub chan2_raw: u16,
16010    #[doc = "RC channel 3 value"]
16011    pub chan3_raw: u16,
16012    #[doc = "RC channel 4 value"]
16013    pub chan4_raw: u16,
16014    #[doc = "RC channel 5 value"]
16015    pub chan5_raw: u16,
16016    #[doc = "RC channel 6 value"]
16017    pub chan6_raw: u16,
16018    #[doc = "RC channel 7 value"]
16019    pub chan7_raw: u16,
16020    #[doc = "RC channel 8 value"]
16021    pub chan8_raw: u16,
16022    #[doc = "RC channel 9 value"]
16023    pub chan9_raw: u16,
16024    #[doc = "RC channel 10 value"]
16025    pub chan10_raw: u16,
16026    #[doc = "RC channel 11 value"]
16027    pub chan11_raw: u16,
16028    #[doc = "RC channel 12 value"]
16029    pub chan12_raw: u16,
16030    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16031    pub rssi: u8,
16032}
16033impl HIL_RC_INPUTS_RAW_DATA {
16034    pub const ENCODED_LEN: usize = 33usize;
16035    pub const DEFAULT: Self = Self {
16036        time_usec: 0_u64,
16037        chan1_raw: 0_u16,
16038        chan2_raw: 0_u16,
16039        chan3_raw: 0_u16,
16040        chan4_raw: 0_u16,
16041        chan5_raw: 0_u16,
16042        chan6_raw: 0_u16,
16043        chan7_raw: 0_u16,
16044        chan8_raw: 0_u16,
16045        chan9_raw: 0_u16,
16046        chan10_raw: 0_u16,
16047        chan11_raw: 0_u16,
16048        chan12_raw: 0_u16,
16049        rssi: 0_u8,
16050    };
16051    #[cfg(feature = "arbitrary")]
16052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16053        use arbitrary::{Arbitrary, Unstructured};
16054        let mut buf = [0u8; 1024];
16055        rng.fill_bytes(&mut buf);
16056        let mut unstructured = Unstructured::new(&buf);
16057        Self::arbitrary(&mut unstructured).unwrap_or_default()
16058    }
16059}
16060impl Default for HIL_RC_INPUTS_RAW_DATA {
16061    fn default() -> Self {
16062        Self::DEFAULT.clone()
16063    }
16064}
16065impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16066    type Message = MavMessage;
16067    const ID: u32 = 92u32;
16068    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16069    const EXTRA_CRC: u8 = 54u8;
16070    const ENCODED_LEN: usize = 33usize;
16071    fn deser(
16072        _version: MavlinkVersion,
16073        __input: &[u8],
16074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16075        let avail_len = __input.len();
16076        let mut payload_buf = [0; Self::ENCODED_LEN];
16077        let mut buf = if avail_len < Self::ENCODED_LEN {
16078            payload_buf[0..avail_len].copy_from_slice(__input);
16079            Bytes::new(&payload_buf)
16080        } else {
16081            Bytes::new(__input)
16082        };
16083        let mut __struct = Self::default();
16084        __struct.time_usec = buf.get_u64_le();
16085        __struct.chan1_raw = buf.get_u16_le();
16086        __struct.chan2_raw = buf.get_u16_le();
16087        __struct.chan3_raw = buf.get_u16_le();
16088        __struct.chan4_raw = buf.get_u16_le();
16089        __struct.chan5_raw = buf.get_u16_le();
16090        __struct.chan6_raw = buf.get_u16_le();
16091        __struct.chan7_raw = buf.get_u16_le();
16092        __struct.chan8_raw = buf.get_u16_le();
16093        __struct.chan9_raw = buf.get_u16_le();
16094        __struct.chan10_raw = buf.get_u16_le();
16095        __struct.chan11_raw = buf.get_u16_le();
16096        __struct.chan12_raw = buf.get_u16_le();
16097        __struct.rssi = buf.get_u8();
16098        Ok(__struct)
16099    }
16100    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16101        let mut __tmp = BytesMut::new(bytes);
16102        #[allow(clippy::absurd_extreme_comparisons)]
16103        #[allow(unused_comparisons)]
16104        if __tmp.remaining() < Self::ENCODED_LEN {
16105            panic!(
16106                "buffer is too small (need {} bytes, but got {})",
16107                Self::ENCODED_LEN,
16108                __tmp.remaining(),
16109            )
16110        }
16111        __tmp.put_u64_le(self.time_usec);
16112        __tmp.put_u16_le(self.chan1_raw);
16113        __tmp.put_u16_le(self.chan2_raw);
16114        __tmp.put_u16_le(self.chan3_raw);
16115        __tmp.put_u16_le(self.chan4_raw);
16116        __tmp.put_u16_le(self.chan5_raw);
16117        __tmp.put_u16_le(self.chan6_raw);
16118        __tmp.put_u16_le(self.chan7_raw);
16119        __tmp.put_u16_le(self.chan8_raw);
16120        __tmp.put_u16_le(self.chan9_raw);
16121        __tmp.put_u16_le(self.chan10_raw);
16122        __tmp.put_u16_le(self.chan11_raw);
16123        __tmp.put_u16_le(self.chan12_raw);
16124        __tmp.put_u8(self.rssi);
16125        if matches!(version, MavlinkVersion::V2) {
16126            let len = __tmp.len();
16127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16128        } else {
16129            __tmp.len()
16130        }
16131    }
16132}
16133#[doc = "The IMU readings in SI units in NED body frame."]
16134#[doc = ""]
16135#[doc = "ID: 107"]
16136#[derive(Debug, Clone, PartialEq)]
16137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16139#[cfg_attr(feature = "ts", derive(TS))]
16140#[cfg_attr(feature = "ts", ts(export))]
16141pub struct HIL_SENSOR_DATA {
16142    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16143    pub time_usec: u64,
16144    #[doc = "X acceleration"]
16145    pub xacc: f32,
16146    #[doc = "Y acceleration"]
16147    pub yacc: f32,
16148    #[doc = "Z acceleration"]
16149    pub zacc: f32,
16150    #[doc = "Angular speed around X axis in body frame"]
16151    pub xgyro: f32,
16152    #[doc = "Angular speed around Y axis in body frame"]
16153    pub ygyro: f32,
16154    #[doc = "Angular speed around Z axis in body frame"]
16155    pub zgyro: f32,
16156    #[doc = "X Magnetic field"]
16157    pub xmag: f32,
16158    #[doc = "Y Magnetic field"]
16159    pub ymag: f32,
16160    #[doc = "Z Magnetic field"]
16161    pub zmag: f32,
16162    #[doc = "Absolute pressure"]
16163    pub abs_pressure: f32,
16164    #[doc = "Differential pressure (airspeed)"]
16165    pub diff_pressure: f32,
16166    #[doc = "Altitude calculated from pressure"]
16167    pub pressure_alt: f32,
16168    #[doc = "Temperature"]
16169    pub temperature: f32,
16170    #[doc = "Bitmap for fields that have updated since last message"]
16171    pub fields_updated: HilSensorUpdatedFlags,
16172    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16174    pub id: u8,
16175}
16176impl HIL_SENSOR_DATA {
16177    pub const ENCODED_LEN: usize = 65usize;
16178    pub const DEFAULT: Self = Self {
16179        time_usec: 0_u64,
16180        xacc: 0.0_f32,
16181        yacc: 0.0_f32,
16182        zacc: 0.0_f32,
16183        xgyro: 0.0_f32,
16184        ygyro: 0.0_f32,
16185        zgyro: 0.0_f32,
16186        xmag: 0.0_f32,
16187        ymag: 0.0_f32,
16188        zmag: 0.0_f32,
16189        abs_pressure: 0.0_f32,
16190        diff_pressure: 0.0_f32,
16191        pressure_alt: 0.0_f32,
16192        temperature: 0.0_f32,
16193        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16194        id: 0_u8,
16195    };
16196    #[cfg(feature = "arbitrary")]
16197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16198        use arbitrary::{Arbitrary, Unstructured};
16199        let mut buf = [0u8; 1024];
16200        rng.fill_bytes(&mut buf);
16201        let mut unstructured = Unstructured::new(&buf);
16202        Self::arbitrary(&mut unstructured).unwrap_or_default()
16203    }
16204}
16205impl Default for HIL_SENSOR_DATA {
16206    fn default() -> Self {
16207        Self::DEFAULT.clone()
16208    }
16209}
16210impl MessageData for HIL_SENSOR_DATA {
16211    type Message = MavMessage;
16212    const ID: u32 = 107u32;
16213    const NAME: &'static str = "HIL_SENSOR";
16214    const EXTRA_CRC: u8 = 108u8;
16215    const ENCODED_LEN: usize = 65usize;
16216    fn deser(
16217        _version: MavlinkVersion,
16218        __input: &[u8],
16219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16220        let avail_len = __input.len();
16221        let mut payload_buf = [0; Self::ENCODED_LEN];
16222        let mut buf = if avail_len < Self::ENCODED_LEN {
16223            payload_buf[0..avail_len].copy_from_slice(__input);
16224            Bytes::new(&payload_buf)
16225        } else {
16226            Bytes::new(__input)
16227        };
16228        let mut __struct = Self::default();
16229        __struct.time_usec = buf.get_u64_le();
16230        __struct.xacc = buf.get_f32_le();
16231        __struct.yacc = buf.get_f32_le();
16232        __struct.zacc = buf.get_f32_le();
16233        __struct.xgyro = buf.get_f32_le();
16234        __struct.ygyro = buf.get_f32_le();
16235        __struct.zgyro = buf.get_f32_le();
16236        __struct.xmag = buf.get_f32_le();
16237        __struct.ymag = buf.get_f32_le();
16238        __struct.zmag = buf.get_f32_le();
16239        __struct.abs_pressure = buf.get_f32_le();
16240        __struct.diff_pressure = buf.get_f32_le();
16241        __struct.pressure_alt = buf.get_f32_le();
16242        __struct.temperature = buf.get_f32_le();
16243        let tmp = buf.get_u32_le();
16244        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16245            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16246        )
16247        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16248            flag_type: "HilSensorUpdatedFlags",
16249            value: tmp as u64,
16250        })?;
16251        __struct.id = buf.get_u8();
16252        Ok(__struct)
16253    }
16254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16255        let mut __tmp = BytesMut::new(bytes);
16256        #[allow(clippy::absurd_extreme_comparisons)]
16257        #[allow(unused_comparisons)]
16258        if __tmp.remaining() < Self::ENCODED_LEN {
16259            panic!(
16260                "buffer is too small (need {} bytes, but got {})",
16261                Self::ENCODED_LEN,
16262                __tmp.remaining(),
16263            )
16264        }
16265        __tmp.put_u64_le(self.time_usec);
16266        __tmp.put_f32_le(self.xacc);
16267        __tmp.put_f32_le(self.yacc);
16268        __tmp.put_f32_le(self.zacc);
16269        __tmp.put_f32_le(self.xgyro);
16270        __tmp.put_f32_le(self.ygyro);
16271        __tmp.put_f32_le(self.zgyro);
16272        __tmp.put_f32_le(self.xmag);
16273        __tmp.put_f32_le(self.ymag);
16274        __tmp.put_f32_le(self.zmag);
16275        __tmp.put_f32_le(self.abs_pressure);
16276        __tmp.put_f32_le(self.diff_pressure);
16277        __tmp.put_f32_le(self.pressure_alt);
16278        __tmp.put_f32_le(self.temperature);
16279        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16280        if matches!(version, MavlinkVersion::V2) {
16281            __tmp.put_u8(self.id);
16282            let len = __tmp.len();
16283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16284        } else {
16285            __tmp.len()
16286        }
16287    }
16288}
16289#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16290#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16291#[doc = ""]
16292#[doc = "ID: 90"]
16293#[derive(Debug, Clone, PartialEq)]
16294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16296#[cfg_attr(feature = "ts", derive(TS))]
16297#[cfg_attr(feature = "ts", ts(export))]
16298pub struct HIL_STATE_DATA {
16299    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16300    pub time_usec: u64,
16301    #[doc = "Roll angle"]
16302    pub roll: f32,
16303    #[doc = "Pitch angle"]
16304    pub pitch: f32,
16305    #[doc = "Yaw angle"]
16306    pub yaw: f32,
16307    #[doc = "Body frame roll / phi angular speed"]
16308    pub rollspeed: f32,
16309    #[doc = "Body frame pitch / theta angular speed"]
16310    pub pitchspeed: f32,
16311    #[doc = "Body frame yaw / psi angular speed"]
16312    pub yawspeed: f32,
16313    #[doc = "Latitude"]
16314    pub lat: i32,
16315    #[doc = "Longitude"]
16316    pub lon: i32,
16317    #[doc = "Altitude"]
16318    pub alt: i32,
16319    #[doc = "Ground X Speed (Latitude)"]
16320    pub vx: i16,
16321    #[doc = "Ground Y Speed (Longitude)"]
16322    pub vy: i16,
16323    #[doc = "Ground Z Speed (Altitude)"]
16324    pub vz: i16,
16325    #[doc = "X acceleration"]
16326    pub xacc: i16,
16327    #[doc = "Y acceleration"]
16328    pub yacc: i16,
16329    #[doc = "Z acceleration"]
16330    pub zacc: i16,
16331}
16332impl HIL_STATE_DATA {
16333    pub const ENCODED_LEN: usize = 56usize;
16334    pub const DEFAULT: Self = Self {
16335        time_usec: 0_u64,
16336        roll: 0.0_f32,
16337        pitch: 0.0_f32,
16338        yaw: 0.0_f32,
16339        rollspeed: 0.0_f32,
16340        pitchspeed: 0.0_f32,
16341        yawspeed: 0.0_f32,
16342        lat: 0_i32,
16343        lon: 0_i32,
16344        alt: 0_i32,
16345        vx: 0_i16,
16346        vy: 0_i16,
16347        vz: 0_i16,
16348        xacc: 0_i16,
16349        yacc: 0_i16,
16350        zacc: 0_i16,
16351    };
16352    #[cfg(feature = "arbitrary")]
16353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16354        use arbitrary::{Arbitrary, Unstructured};
16355        let mut buf = [0u8; 1024];
16356        rng.fill_bytes(&mut buf);
16357        let mut unstructured = Unstructured::new(&buf);
16358        Self::arbitrary(&mut unstructured).unwrap_or_default()
16359    }
16360}
16361impl Default for HIL_STATE_DATA {
16362    fn default() -> Self {
16363        Self::DEFAULT.clone()
16364    }
16365}
16366impl MessageData for HIL_STATE_DATA {
16367    type Message = MavMessage;
16368    const ID: u32 = 90u32;
16369    const NAME: &'static str = "HIL_STATE";
16370    const EXTRA_CRC: u8 = 183u8;
16371    const ENCODED_LEN: usize = 56usize;
16372    fn deser(
16373        _version: MavlinkVersion,
16374        __input: &[u8],
16375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16376        let avail_len = __input.len();
16377        let mut payload_buf = [0; Self::ENCODED_LEN];
16378        let mut buf = if avail_len < Self::ENCODED_LEN {
16379            payload_buf[0..avail_len].copy_from_slice(__input);
16380            Bytes::new(&payload_buf)
16381        } else {
16382            Bytes::new(__input)
16383        };
16384        let mut __struct = Self::default();
16385        __struct.time_usec = buf.get_u64_le();
16386        __struct.roll = buf.get_f32_le();
16387        __struct.pitch = buf.get_f32_le();
16388        __struct.yaw = buf.get_f32_le();
16389        __struct.rollspeed = buf.get_f32_le();
16390        __struct.pitchspeed = buf.get_f32_le();
16391        __struct.yawspeed = buf.get_f32_le();
16392        __struct.lat = buf.get_i32_le();
16393        __struct.lon = buf.get_i32_le();
16394        __struct.alt = buf.get_i32_le();
16395        __struct.vx = buf.get_i16_le();
16396        __struct.vy = buf.get_i16_le();
16397        __struct.vz = buf.get_i16_le();
16398        __struct.xacc = buf.get_i16_le();
16399        __struct.yacc = buf.get_i16_le();
16400        __struct.zacc = buf.get_i16_le();
16401        Ok(__struct)
16402    }
16403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16404        let mut __tmp = BytesMut::new(bytes);
16405        #[allow(clippy::absurd_extreme_comparisons)]
16406        #[allow(unused_comparisons)]
16407        if __tmp.remaining() < Self::ENCODED_LEN {
16408            panic!(
16409                "buffer is too small (need {} bytes, but got {})",
16410                Self::ENCODED_LEN,
16411                __tmp.remaining(),
16412            )
16413        }
16414        __tmp.put_u64_le(self.time_usec);
16415        __tmp.put_f32_le(self.roll);
16416        __tmp.put_f32_le(self.pitch);
16417        __tmp.put_f32_le(self.yaw);
16418        __tmp.put_f32_le(self.rollspeed);
16419        __tmp.put_f32_le(self.pitchspeed);
16420        __tmp.put_f32_le(self.yawspeed);
16421        __tmp.put_i32_le(self.lat);
16422        __tmp.put_i32_le(self.lon);
16423        __tmp.put_i32_le(self.alt);
16424        __tmp.put_i16_le(self.vx);
16425        __tmp.put_i16_le(self.vy);
16426        __tmp.put_i16_le(self.vz);
16427        __tmp.put_i16_le(self.xacc);
16428        __tmp.put_i16_le(self.yacc);
16429        __tmp.put_i16_le(self.zacc);
16430        if matches!(version, MavlinkVersion::V2) {
16431            let len = __tmp.len();
16432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16433        } else {
16434            __tmp.len()
16435        }
16436    }
16437}
16438#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16439#[doc = ""]
16440#[doc = "ID: 115"]
16441#[derive(Debug, Clone, PartialEq)]
16442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16444#[cfg_attr(feature = "ts", derive(TS))]
16445#[cfg_attr(feature = "ts", ts(export))]
16446pub struct HIL_STATE_QUATERNION_DATA {
16447    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16448    pub time_usec: u64,
16449    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16451    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16452    pub attitude_quaternion: [f32; 4],
16453    #[doc = "Body frame roll / phi angular speed"]
16454    pub rollspeed: f32,
16455    #[doc = "Body frame pitch / theta angular speed"]
16456    pub pitchspeed: f32,
16457    #[doc = "Body frame yaw / psi angular speed"]
16458    pub yawspeed: f32,
16459    #[doc = "Latitude"]
16460    pub lat: i32,
16461    #[doc = "Longitude"]
16462    pub lon: i32,
16463    #[doc = "Altitude"]
16464    pub alt: i32,
16465    #[doc = "Ground X Speed (Latitude)"]
16466    pub vx: i16,
16467    #[doc = "Ground Y Speed (Longitude)"]
16468    pub vy: i16,
16469    #[doc = "Ground Z Speed (Altitude)"]
16470    pub vz: i16,
16471    #[doc = "Indicated airspeed"]
16472    pub ind_airspeed: u16,
16473    #[doc = "True airspeed"]
16474    pub true_airspeed: u16,
16475    #[doc = "X acceleration"]
16476    pub xacc: i16,
16477    #[doc = "Y acceleration"]
16478    pub yacc: i16,
16479    #[doc = "Z acceleration"]
16480    pub zacc: i16,
16481}
16482impl HIL_STATE_QUATERNION_DATA {
16483    pub const ENCODED_LEN: usize = 64usize;
16484    pub const DEFAULT: Self = Self {
16485        time_usec: 0_u64,
16486        attitude_quaternion: [0.0_f32; 4usize],
16487        rollspeed: 0.0_f32,
16488        pitchspeed: 0.0_f32,
16489        yawspeed: 0.0_f32,
16490        lat: 0_i32,
16491        lon: 0_i32,
16492        alt: 0_i32,
16493        vx: 0_i16,
16494        vy: 0_i16,
16495        vz: 0_i16,
16496        ind_airspeed: 0_u16,
16497        true_airspeed: 0_u16,
16498        xacc: 0_i16,
16499        yacc: 0_i16,
16500        zacc: 0_i16,
16501    };
16502    #[cfg(feature = "arbitrary")]
16503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16504        use arbitrary::{Arbitrary, Unstructured};
16505        let mut buf = [0u8; 1024];
16506        rng.fill_bytes(&mut buf);
16507        let mut unstructured = Unstructured::new(&buf);
16508        Self::arbitrary(&mut unstructured).unwrap_or_default()
16509    }
16510}
16511impl Default for HIL_STATE_QUATERNION_DATA {
16512    fn default() -> Self {
16513        Self::DEFAULT.clone()
16514    }
16515}
16516impl MessageData for HIL_STATE_QUATERNION_DATA {
16517    type Message = MavMessage;
16518    const ID: u32 = 115u32;
16519    const NAME: &'static str = "HIL_STATE_QUATERNION";
16520    const EXTRA_CRC: u8 = 4u8;
16521    const ENCODED_LEN: usize = 64usize;
16522    fn deser(
16523        _version: MavlinkVersion,
16524        __input: &[u8],
16525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16526        let avail_len = __input.len();
16527        let mut payload_buf = [0; Self::ENCODED_LEN];
16528        let mut buf = if avail_len < Self::ENCODED_LEN {
16529            payload_buf[0..avail_len].copy_from_slice(__input);
16530            Bytes::new(&payload_buf)
16531        } else {
16532            Bytes::new(__input)
16533        };
16534        let mut __struct = Self::default();
16535        __struct.time_usec = buf.get_u64_le();
16536        for v in &mut __struct.attitude_quaternion {
16537            let val = buf.get_f32_le();
16538            *v = val;
16539        }
16540        __struct.rollspeed = buf.get_f32_le();
16541        __struct.pitchspeed = buf.get_f32_le();
16542        __struct.yawspeed = buf.get_f32_le();
16543        __struct.lat = buf.get_i32_le();
16544        __struct.lon = buf.get_i32_le();
16545        __struct.alt = buf.get_i32_le();
16546        __struct.vx = buf.get_i16_le();
16547        __struct.vy = buf.get_i16_le();
16548        __struct.vz = buf.get_i16_le();
16549        __struct.ind_airspeed = buf.get_u16_le();
16550        __struct.true_airspeed = buf.get_u16_le();
16551        __struct.xacc = buf.get_i16_le();
16552        __struct.yacc = buf.get_i16_le();
16553        __struct.zacc = buf.get_i16_le();
16554        Ok(__struct)
16555    }
16556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16557        let mut __tmp = BytesMut::new(bytes);
16558        #[allow(clippy::absurd_extreme_comparisons)]
16559        #[allow(unused_comparisons)]
16560        if __tmp.remaining() < Self::ENCODED_LEN {
16561            panic!(
16562                "buffer is too small (need {} bytes, but got {})",
16563                Self::ENCODED_LEN,
16564                __tmp.remaining(),
16565            )
16566        }
16567        __tmp.put_u64_le(self.time_usec);
16568        for val in &self.attitude_quaternion {
16569            __tmp.put_f32_le(*val);
16570        }
16571        __tmp.put_f32_le(self.rollspeed);
16572        __tmp.put_f32_le(self.pitchspeed);
16573        __tmp.put_f32_le(self.yawspeed);
16574        __tmp.put_i32_le(self.lat);
16575        __tmp.put_i32_le(self.lon);
16576        __tmp.put_i32_le(self.alt);
16577        __tmp.put_i16_le(self.vx);
16578        __tmp.put_i16_le(self.vy);
16579        __tmp.put_i16_le(self.vz);
16580        __tmp.put_u16_le(self.ind_airspeed);
16581        __tmp.put_u16_le(self.true_airspeed);
16582        __tmp.put_i16_le(self.xacc);
16583        __tmp.put_i16_le(self.yacc);
16584        __tmp.put_i16_le(self.zacc);
16585        if matches!(version, MavlinkVersion::V2) {
16586            let len = __tmp.len();
16587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16588        } else {
16589            __tmp.len()
16590        }
16591    }
16592}
16593#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16594#[doc = ""]
16595#[doc = "ID: 242"]
16596#[derive(Debug, Clone, PartialEq)]
16597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16599#[cfg_attr(feature = "ts", derive(TS))]
16600#[cfg_attr(feature = "ts", ts(export))]
16601pub struct HOME_POSITION_DATA {
16602    #[doc = "Latitude (WGS84)"]
16603    pub latitude: i32,
16604    #[doc = "Longitude (WGS84)"]
16605    pub longitude: i32,
16606    #[doc = "Altitude (MSL). Positive for up."]
16607    pub altitude: i32,
16608    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16609    pub x: f32,
16610    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16611    pub y: f32,
16612    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16613    pub z: f32,
16614    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16617    pub q: [f32; 4],
16618    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16619    pub approach_x: f32,
16620    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16621    pub approach_y: f32,
16622    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16623    pub approach_z: f32,
16624    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16626    pub time_usec: u64,
16627}
16628impl HOME_POSITION_DATA {
16629    pub const ENCODED_LEN: usize = 60usize;
16630    pub const DEFAULT: Self = Self {
16631        latitude: 0_i32,
16632        longitude: 0_i32,
16633        altitude: 0_i32,
16634        x: 0.0_f32,
16635        y: 0.0_f32,
16636        z: 0.0_f32,
16637        q: [0.0_f32; 4usize],
16638        approach_x: 0.0_f32,
16639        approach_y: 0.0_f32,
16640        approach_z: 0.0_f32,
16641        time_usec: 0_u64,
16642    };
16643    #[cfg(feature = "arbitrary")]
16644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16645        use arbitrary::{Arbitrary, Unstructured};
16646        let mut buf = [0u8; 1024];
16647        rng.fill_bytes(&mut buf);
16648        let mut unstructured = Unstructured::new(&buf);
16649        Self::arbitrary(&mut unstructured).unwrap_or_default()
16650    }
16651}
16652impl Default for HOME_POSITION_DATA {
16653    fn default() -> Self {
16654        Self::DEFAULT.clone()
16655    }
16656}
16657impl MessageData for HOME_POSITION_DATA {
16658    type Message = MavMessage;
16659    const ID: u32 = 242u32;
16660    const NAME: &'static str = "HOME_POSITION";
16661    const EXTRA_CRC: u8 = 104u8;
16662    const ENCODED_LEN: usize = 60usize;
16663    fn deser(
16664        _version: MavlinkVersion,
16665        __input: &[u8],
16666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16667        let avail_len = __input.len();
16668        let mut payload_buf = [0; Self::ENCODED_LEN];
16669        let mut buf = if avail_len < Self::ENCODED_LEN {
16670            payload_buf[0..avail_len].copy_from_slice(__input);
16671            Bytes::new(&payload_buf)
16672        } else {
16673            Bytes::new(__input)
16674        };
16675        let mut __struct = Self::default();
16676        __struct.latitude = buf.get_i32_le();
16677        __struct.longitude = buf.get_i32_le();
16678        __struct.altitude = buf.get_i32_le();
16679        __struct.x = buf.get_f32_le();
16680        __struct.y = buf.get_f32_le();
16681        __struct.z = buf.get_f32_le();
16682        for v in &mut __struct.q {
16683            let val = buf.get_f32_le();
16684            *v = val;
16685        }
16686        __struct.approach_x = buf.get_f32_le();
16687        __struct.approach_y = buf.get_f32_le();
16688        __struct.approach_z = buf.get_f32_le();
16689        __struct.time_usec = buf.get_u64_le();
16690        Ok(__struct)
16691    }
16692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16693        let mut __tmp = BytesMut::new(bytes);
16694        #[allow(clippy::absurd_extreme_comparisons)]
16695        #[allow(unused_comparisons)]
16696        if __tmp.remaining() < Self::ENCODED_LEN {
16697            panic!(
16698                "buffer is too small (need {} bytes, but got {})",
16699                Self::ENCODED_LEN,
16700                __tmp.remaining(),
16701            )
16702        }
16703        __tmp.put_i32_le(self.latitude);
16704        __tmp.put_i32_le(self.longitude);
16705        __tmp.put_i32_le(self.altitude);
16706        __tmp.put_f32_le(self.x);
16707        __tmp.put_f32_le(self.y);
16708        __tmp.put_f32_le(self.z);
16709        for val in &self.q {
16710            __tmp.put_f32_le(*val);
16711        }
16712        __tmp.put_f32_le(self.approach_x);
16713        __tmp.put_f32_le(self.approach_y);
16714        __tmp.put_f32_le(self.approach_z);
16715        if matches!(version, MavlinkVersion::V2) {
16716            __tmp.put_u64_le(self.time_usec);
16717            let len = __tmp.len();
16718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16719        } else {
16720            __tmp.len()
16721        }
16722    }
16723}
16724#[doc = "Temperature and humidity from hygrometer."]
16725#[doc = ""]
16726#[doc = "ID: 12920"]
16727#[derive(Debug, Clone, PartialEq)]
16728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16730#[cfg_attr(feature = "ts", derive(TS))]
16731#[cfg_attr(feature = "ts", ts(export))]
16732pub struct HYGROMETER_SENSOR_DATA {
16733    #[doc = "Temperature"]
16734    pub temperature: i16,
16735    #[doc = "Humidity"]
16736    pub humidity: u16,
16737    #[doc = "Hygrometer ID"]
16738    pub id: u8,
16739}
16740impl HYGROMETER_SENSOR_DATA {
16741    pub const ENCODED_LEN: usize = 5usize;
16742    pub const DEFAULT: Self = Self {
16743        temperature: 0_i16,
16744        humidity: 0_u16,
16745        id: 0_u8,
16746    };
16747    #[cfg(feature = "arbitrary")]
16748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16749        use arbitrary::{Arbitrary, Unstructured};
16750        let mut buf = [0u8; 1024];
16751        rng.fill_bytes(&mut buf);
16752        let mut unstructured = Unstructured::new(&buf);
16753        Self::arbitrary(&mut unstructured).unwrap_or_default()
16754    }
16755}
16756impl Default for HYGROMETER_SENSOR_DATA {
16757    fn default() -> Self {
16758        Self::DEFAULT.clone()
16759    }
16760}
16761impl MessageData for HYGROMETER_SENSOR_DATA {
16762    type Message = MavMessage;
16763    const ID: u32 = 12920u32;
16764    const NAME: &'static str = "HYGROMETER_SENSOR";
16765    const EXTRA_CRC: u8 = 20u8;
16766    const ENCODED_LEN: usize = 5usize;
16767    fn deser(
16768        _version: MavlinkVersion,
16769        __input: &[u8],
16770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16771        let avail_len = __input.len();
16772        let mut payload_buf = [0; Self::ENCODED_LEN];
16773        let mut buf = if avail_len < Self::ENCODED_LEN {
16774            payload_buf[0..avail_len].copy_from_slice(__input);
16775            Bytes::new(&payload_buf)
16776        } else {
16777            Bytes::new(__input)
16778        };
16779        let mut __struct = Self::default();
16780        __struct.temperature = buf.get_i16_le();
16781        __struct.humidity = buf.get_u16_le();
16782        __struct.id = buf.get_u8();
16783        Ok(__struct)
16784    }
16785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16786        let mut __tmp = BytesMut::new(bytes);
16787        #[allow(clippy::absurd_extreme_comparisons)]
16788        #[allow(unused_comparisons)]
16789        if __tmp.remaining() < Self::ENCODED_LEN {
16790            panic!(
16791                "buffer is too small (need {} bytes, but got {})",
16792                Self::ENCODED_LEN,
16793                __tmp.remaining(),
16794            )
16795        }
16796        __tmp.put_i16_le(self.temperature);
16797        __tmp.put_u16_le(self.humidity);
16798        __tmp.put_u8(self.id);
16799        if matches!(version, MavlinkVersion::V2) {
16800            let len = __tmp.len();
16801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16802        } else {
16803            __tmp.len()
16804        }
16805    }
16806}
16807#[doc = "Illuminator status."]
16808#[doc = ""]
16809#[doc = "ID: 440"]
16810#[derive(Debug, Clone, PartialEq)]
16811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16813#[cfg_attr(feature = "ts", derive(TS))]
16814#[cfg_attr(feature = "ts", ts(export))]
16815pub struct ILLUMINATOR_STATUS_DATA {
16816    #[doc = "Time since the start-up of the illuminator in ms"]
16817    pub uptime_ms: u32,
16818    #[doc = "Errors"]
16819    pub error_status: IlluminatorErrorFlags,
16820    #[doc = "Illuminator brightness"]
16821    pub brightness: f32,
16822    #[doc = "Illuminator strobing period in seconds"]
16823    pub strobe_period: f32,
16824    #[doc = "Illuminator strobing duty cycle"]
16825    pub strobe_duty_cycle: f32,
16826    #[doc = "Temperature in Celsius"]
16827    pub temp_c: f32,
16828    #[doc = "Minimum strobing period in seconds"]
16829    pub min_strobe_period: f32,
16830    #[doc = "Maximum strobing period in seconds"]
16831    pub max_strobe_period: f32,
16832    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16833    pub enable: u8,
16834    #[doc = "Supported illuminator modes"]
16835    pub mode_bitmask: IlluminatorMode,
16836    #[doc = "Illuminator mode"]
16837    pub mode: IlluminatorMode,
16838}
16839impl ILLUMINATOR_STATUS_DATA {
16840    pub const ENCODED_LEN: usize = 35usize;
16841    pub const DEFAULT: Self = Self {
16842        uptime_ms: 0_u32,
16843        error_status: IlluminatorErrorFlags::DEFAULT,
16844        brightness: 0.0_f32,
16845        strobe_period: 0.0_f32,
16846        strobe_duty_cycle: 0.0_f32,
16847        temp_c: 0.0_f32,
16848        min_strobe_period: 0.0_f32,
16849        max_strobe_period: 0.0_f32,
16850        enable: 0_u8,
16851        mode_bitmask: IlluminatorMode::DEFAULT,
16852        mode: IlluminatorMode::DEFAULT,
16853    };
16854    #[cfg(feature = "arbitrary")]
16855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16856        use arbitrary::{Arbitrary, Unstructured};
16857        let mut buf = [0u8; 1024];
16858        rng.fill_bytes(&mut buf);
16859        let mut unstructured = Unstructured::new(&buf);
16860        Self::arbitrary(&mut unstructured).unwrap_or_default()
16861    }
16862}
16863impl Default for ILLUMINATOR_STATUS_DATA {
16864    fn default() -> Self {
16865        Self::DEFAULT.clone()
16866    }
16867}
16868impl MessageData for ILLUMINATOR_STATUS_DATA {
16869    type Message = MavMessage;
16870    const ID: u32 = 440u32;
16871    const NAME: &'static str = "ILLUMINATOR_STATUS";
16872    const EXTRA_CRC: u8 = 66u8;
16873    const ENCODED_LEN: usize = 35usize;
16874    fn deser(
16875        _version: MavlinkVersion,
16876        __input: &[u8],
16877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16878        let avail_len = __input.len();
16879        let mut payload_buf = [0; Self::ENCODED_LEN];
16880        let mut buf = if avail_len < Self::ENCODED_LEN {
16881            payload_buf[0..avail_len].copy_from_slice(__input);
16882            Bytes::new(&payload_buf)
16883        } else {
16884            Bytes::new(__input)
16885        };
16886        let mut __struct = Self::default();
16887        __struct.uptime_ms = buf.get_u32_le();
16888        let tmp = buf.get_u32_le();
16889        __struct.error_status = IlluminatorErrorFlags::from_bits(
16890            tmp as <IlluminatorErrorFlags as Flags>::Bits,
16891        )
16892        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16893            flag_type: "IlluminatorErrorFlags",
16894            value: tmp as u64,
16895        })?;
16896        __struct.brightness = buf.get_f32_le();
16897        __struct.strobe_period = buf.get_f32_le();
16898        __struct.strobe_duty_cycle = buf.get_f32_le();
16899        __struct.temp_c = buf.get_f32_le();
16900        __struct.min_strobe_period = buf.get_f32_le();
16901        __struct.max_strobe_period = buf.get_f32_le();
16902        __struct.enable = buf.get_u8();
16903        let tmp = buf.get_u8();
16904        __struct.mode_bitmask =
16905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16906                enum_type: "IlluminatorMode",
16907                value: tmp as u64,
16908            })?;
16909        let tmp = buf.get_u8();
16910        __struct.mode =
16911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16912                enum_type: "IlluminatorMode",
16913                value: tmp as u64,
16914            })?;
16915        Ok(__struct)
16916    }
16917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16918        let mut __tmp = BytesMut::new(bytes);
16919        #[allow(clippy::absurd_extreme_comparisons)]
16920        #[allow(unused_comparisons)]
16921        if __tmp.remaining() < Self::ENCODED_LEN {
16922            panic!(
16923                "buffer is too small (need {} bytes, but got {})",
16924                Self::ENCODED_LEN,
16925                __tmp.remaining(),
16926            )
16927        }
16928        __tmp.put_u32_le(self.uptime_ms);
16929        __tmp.put_u32_le(self.error_status.bits() as u32);
16930        __tmp.put_f32_le(self.brightness);
16931        __tmp.put_f32_le(self.strobe_period);
16932        __tmp.put_f32_le(self.strobe_duty_cycle);
16933        __tmp.put_f32_le(self.temp_c);
16934        __tmp.put_f32_le(self.min_strobe_period);
16935        __tmp.put_f32_le(self.max_strobe_period);
16936        __tmp.put_u8(self.enable);
16937        __tmp.put_u8(self.mode_bitmask as u8);
16938        __tmp.put_u8(self.mode as u8);
16939        if matches!(version, MavlinkVersion::V2) {
16940            let len = __tmp.len();
16941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16942        } else {
16943            __tmp.len()
16944        }
16945    }
16946}
16947#[doc = "Status of the Iridium SBD link."]
16948#[doc = ""]
16949#[doc = "ID: 335"]
16950#[derive(Debug, Clone, PartialEq)]
16951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16953#[cfg_attr(feature = "ts", derive(TS))]
16954#[cfg_attr(feature = "ts", ts(export))]
16955pub struct ISBD_LINK_STATUS_DATA {
16956    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16957    pub timestamp: u64,
16958    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16959    pub last_heartbeat: u64,
16960    #[doc = "Number of failed SBD sessions."]
16961    pub failed_sessions: u16,
16962    #[doc = "Number of successful SBD sessions."]
16963    pub successful_sessions: u16,
16964    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16965    pub signal_quality: u8,
16966    #[doc = "1: Ring call pending, 0: No call pending."]
16967    pub ring_pending: u8,
16968    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16969    pub tx_session_pending: u8,
16970    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16971    pub rx_session_pending: u8,
16972}
16973impl ISBD_LINK_STATUS_DATA {
16974    pub const ENCODED_LEN: usize = 24usize;
16975    pub const DEFAULT: Self = Self {
16976        timestamp: 0_u64,
16977        last_heartbeat: 0_u64,
16978        failed_sessions: 0_u16,
16979        successful_sessions: 0_u16,
16980        signal_quality: 0_u8,
16981        ring_pending: 0_u8,
16982        tx_session_pending: 0_u8,
16983        rx_session_pending: 0_u8,
16984    };
16985    #[cfg(feature = "arbitrary")]
16986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16987        use arbitrary::{Arbitrary, Unstructured};
16988        let mut buf = [0u8; 1024];
16989        rng.fill_bytes(&mut buf);
16990        let mut unstructured = Unstructured::new(&buf);
16991        Self::arbitrary(&mut unstructured).unwrap_or_default()
16992    }
16993}
16994impl Default for ISBD_LINK_STATUS_DATA {
16995    fn default() -> Self {
16996        Self::DEFAULT.clone()
16997    }
16998}
16999impl MessageData for ISBD_LINK_STATUS_DATA {
17000    type Message = MavMessage;
17001    const ID: u32 = 335u32;
17002    const NAME: &'static str = "ISBD_LINK_STATUS";
17003    const EXTRA_CRC: u8 = 225u8;
17004    const ENCODED_LEN: usize = 24usize;
17005    fn deser(
17006        _version: MavlinkVersion,
17007        __input: &[u8],
17008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17009        let avail_len = __input.len();
17010        let mut payload_buf = [0; Self::ENCODED_LEN];
17011        let mut buf = if avail_len < Self::ENCODED_LEN {
17012            payload_buf[0..avail_len].copy_from_slice(__input);
17013            Bytes::new(&payload_buf)
17014        } else {
17015            Bytes::new(__input)
17016        };
17017        let mut __struct = Self::default();
17018        __struct.timestamp = buf.get_u64_le();
17019        __struct.last_heartbeat = buf.get_u64_le();
17020        __struct.failed_sessions = buf.get_u16_le();
17021        __struct.successful_sessions = buf.get_u16_le();
17022        __struct.signal_quality = buf.get_u8();
17023        __struct.ring_pending = buf.get_u8();
17024        __struct.tx_session_pending = buf.get_u8();
17025        __struct.rx_session_pending = buf.get_u8();
17026        Ok(__struct)
17027    }
17028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17029        let mut __tmp = BytesMut::new(bytes);
17030        #[allow(clippy::absurd_extreme_comparisons)]
17031        #[allow(unused_comparisons)]
17032        if __tmp.remaining() < Self::ENCODED_LEN {
17033            panic!(
17034                "buffer is too small (need {} bytes, but got {})",
17035                Self::ENCODED_LEN,
17036                __tmp.remaining(),
17037            )
17038        }
17039        __tmp.put_u64_le(self.timestamp);
17040        __tmp.put_u64_le(self.last_heartbeat);
17041        __tmp.put_u16_le(self.failed_sessions);
17042        __tmp.put_u16_le(self.successful_sessions);
17043        __tmp.put_u8(self.signal_quality);
17044        __tmp.put_u8(self.ring_pending);
17045        __tmp.put_u8(self.tx_session_pending);
17046        __tmp.put_u8(self.rx_session_pending);
17047        if matches!(version, MavlinkVersion::V2) {
17048            let len = __tmp.len();
17049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17050        } else {
17051            __tmp.len()
17052        }
17053    }
17054}
17055#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17056#[doc = ""]
17057#[doc = "ID: 149"]
17058#[derive(Debug, Clone, PartialEq)]
17059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17061#[cfg_attr(feature = "ts", derive(TS))]
17062#[cfg_attr(feature = "ts", ts(export))]
17063pub struct LANDING_TARGET_DATA {
17064    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17065    pub time_usec: u64,
17066    #[doc = "X-axis angular offset of the target from the center of the image"]
17067    pub angle_x: f32,
17068    #[doc = "Y-axis angular offset of the target from the center of the image"]
17069    pub angle_y: f32,
17070    #[doc = "Distance to the target from the vehicle"]
17071    pub distance: f32,
17072    #[doc = "Size of target along x-axis"]
17073    pub size_x: f32,
17074    #[doc = "Size of target along y-axis"]
17075    pub size_y: f32,
17076    #[doc = "The ID of the target if multiple targets are present"]
17077    pub target_num: u8,
17078    #[doc = "Coordinate frame used for following fields."]
17079    pub frame: MavFrame,
17080    #[doc = "X Position of the landing target in MAV_FRAME"]
17081    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17082    pub x: f32,
17083    #[doc = "Y Position of the landing target in MAV_FRAME"]
17084    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17085    pub y: f32,
17086    #[doc = "Z Position of the landing target in MAV_FRAME"]
17087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17088    pub z: f32,
17089    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17093    pub q: [f32; 4],
17094    #[doc = "Type of landing target"]
17095    #[cfg_attr(feature = "serde", serde(default))]
17096    pub mavtype: LandingTargetType,
17097    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17099    pub position_valid: u8,
17100}
17101impl LANDING_TARGET_DATA {
17102    pub const ENCODED_LEN: usize = 60usize;
17103    pub const DEFAULT: Self = Self {
17104        time_usec: 0_u64,
17105        angle_x: 0.0_f32,
17106        angle_y: 0.0_f32,
17107        distance: 0.0_f32,
17108        size_x: 0.0_f32,
17109        size_y: 0.0_f32,
17110        target_num: 0_u8,
17111        frame: MavFrame::DEFAULT,
17112        x: 0.0_f32,
17113        y: 0.0_f32,
17114        z: 0.0_f32,
17115        q: [0.0_f32; 4usize],
17116        mavtype: LandingTargetType::DEFAULT,
17117        position_valid: 0_u8,
17118    };
17119    #[cfg(feature = "arbitrary")]
17120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17121        use arbitrary::{Arbitrary, Unstructured};
17122        let mut buf = [0u8; 1024];
17123        rng.fill_bytes(&mut buf);
17124        let mut unstructured = Unstructured::new(&buf);
17125        Self::arbitrary(&mut unstructured).unwrap_or_default()
17126    }
17127}
17128impl Default for LANDING_TARGET_DATA {
17129    fn default() -> Self {
17130        Self::DEFAULT.clone()
17131    }
17132}
17133impl MessageData for LANDING_TARGET_DATA {
17134    type Message = MavMessage;
17135    const ID: u32 = 149u32;
17136    const NAME: &'static str = "LANDING_TARGET";
17137    const EXTRA_CRC: u8 = 200u8;
17138    const ENCODED_LEN: usize = 60usize;
17139    fn deser(
17140        _version: MavlinkVersion,
17141        __input: &[u8],
17142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17143        let avail_len = __input.len();
17144        let mut payload_buf = [0; Self::ENCODED_LEN];
17145        let mut buf = if avail_len < Self::ENCODED_LEN {
17146            payload_buf[0..avail_len].copy_from_slice(__input);
17147            Bytes::new(&payload_buf)
17148        } else {
17149            Bytes::new(__input)
17150        };
17151        let mut __struct = Self::default();
17152        __struct.time_usec = buf.get_u64_le();
17153        __struct.angle_x = buf.get_f32_le();
17154        __struct.angle_y = buf.get_f32_le();
17155        __struct.distance = buf.get_f32_le();
17156        __struct.size_x = buf.get_f32_le();
17157        __struct.size_y = buf.get_f32_le();
17158        __struct.target_num = buf.get_u8();
17159        let tmp = buf.get_u8();
17160        __struct.frame =
17161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17162                enum_type: "MavFrame",
17163                value: tmp as u64,
17164            })?;
17165        __struct.x = buf.get_f32_le();
17166        __struct.y = buf.get_f32_le();
17167        __struct.z = buf.get_f32_le();
17168        for v in &mut __struct.q {
17169            let val = buf.get_f32_le();
17170            *v = val;
17171        }
17172        let tmp = buf.get_u8();
17173        __struct.mavtype =
17174            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17175                enum_type: "LandingTargetType",
17176                value: tmp as u64,
17177            })?;
17178        __struct.position_valid = buf.get_u8();
17179        Ok(__struct)
17180    }
17181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17182        let mut __tmp = BytesMut::new(bytes);
17183        #[allow(clippy::absurd_extreme_comparisons)]
17184        #[allow(unused_comparisons)]
17185        if __tmp.remaining() < Self::ENCODED_LEN {
17186            panic!(
17187                "buffer is too small (need {} bytes, but got {})",
17188                Self::ENCODED_LEN,
17189                __tmp.remaining(),
17190            )
17191        }
17192        __tmp.put_u64_le(self.time_usec);
17193        __tmp.put_f32_le(self.angle_x);
17194        __tmp.put_f32_le(self.angle_y);
17195        __tmp.put_f32_le(self.distance);
17196        __tmp.put_f32_le(self.size_x);
17197        __tmp.put_f32_le(self.size_y);
17198        __tmp.put_u8(self.target_num);
17199        __tmp.put_u8(self.frame as u8);
17200        if matches!(version, MavlinkVersion::V2) {
17201            __tmp.put_f32_le(self.x);
17202            __tmp.put_f32_le(self.y);
17203            __tmp.put_f32_le(self.z);
17204            for val in &self.q {
17205                __tmp.put_f32_le(*val);
17206            }
17207            __tmp.put_u8(self.mavtype as u8);
17208            __tmp.put_u8(self.position_valid);
17209            let len = __tmp.len();
17210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17211        } else {
17212            __tmp.len()
17213        }
17214    }
17215}
17216#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17217#[doc = ""]
17218#[doc = "ID: 8"]
17219#[derive(Debug, Clone, PartialEq)]
17220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17222#[cfg_attr(feature = "ts", derive(TS))]
17223#[cfg_attr(feature = "ts", ts(export))]
17224pub struct LINK_NODE_STATUS_DATA {
17225    #[doc = "Timestamp (time since system boot)."]
17226    pub timestamp: u64,
17227    #[doc = "Transmit rate"]
17228    pub tx_rate: u32,
17229    #[doc = "Receive rate"]
17230    pub rx_rate: u32,
17231    #[doc = "Messages sent"]
17232    pub messages_sent: u32,
17233    #[doc = "Messages received (estimated from counting seq)"]
17234    pub messages_received: u32,
17235    #[doc = "Messages lost (estimated from counting seq)"]
17236    pub messages_lost: u32,
17237    #[doc = "Number of bytes that could not be parsed correctly."]
17238    pub rx_parse_err: u16,
17239    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17240    pub tx_overflows: u16,
17241    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17242    pub rx_overflows: u16,
17243    #[doc = "Remaining free transmit buffer space"]
17244    pub tx_buf: u8,
17245    #[doc = "Remaining free receive buffer space"]
17246    pub rx_buf: u8,
17247}
17248impl LINK_NODE_STATUS_DATA {
17249    pub const ENCODED_LEN: usize = 36usize;
17250    pub const DEFAULT: Self = Self {
17251        timestamp: 0_u64,
17252        tx_rate: 0_u32,
17253        rx_rate: 0_u32,
17254        messages_sent: 0_u32,
17255        messages_received: 0_u32,
17256        messages_lost: 0_u32,
17257        rx_parse_err: 0_u16,
17258        tx_overflows: 0_u16,
17259        rx_overflows: 0_u16,
17260        tx_buf: 0_u8,
17261        rx_buf: 0_u8,
17262    };
17263    #[cfg(feature = "arbitrary")]
17264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17265        use arbitrary::{Arbitrary, Unstructured};
17266        let mut buf = [0u8; 1024];
17267        rng.fill_bytes(&mut buf);
17268        let mut unstructured = Unstructured::new(&buf);
17269        Self::arbitrary(&mut unstructured).unwrap_or_default()
17270    }
17271}
17272impl Default for LINK_NODE_STATUS_DATA {
17273    fn default() -> Self {
17274        Self::DEFAULT.clone()
17275    }
17276}
17277impl MessageData for LINK_NODE_STATUS_DATA {
17278    type Message = MavMessage;
17279    const ID: u32 = 8u32;
17280    const NAME: &'static str = "LINK_NODE_STATUS";
17281    const EXTRA_CRC: u8 = 117u8;
17282    const ENCODED_LEN: usize = 36usize;
17283    fn deser(
17284        _version: MavlinkVersion,
17285        __input: &[u8],
17286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17287        let avail_len = __input.len();
17288        let mut payload_buf = [0; Self::ENCODED_LEN];
17289        let mut buf = if avail_len < Self::ENCODED_LEN {
17290            payload_buf[0..avail_len].copy_from_slice(__input);
17291            Bytes::new(&payload_buf)
17292        } else {
17293            Bytes::new(__input)
17294        };
17295        let mut __struct = Self::default();
17296        __struct.timestamp = buf.get_u64_le();
17297        __struct.tx_rate = buf.get_u32_le();
17298        __struct.rx_rate = buf.get_u32_le();
17299        __struct.messages_sent = buf.get_u32_le();
17300        __struct.messages_received = buf.get_u32_le();
17301        __struct.messages_lost = buf.get_u32_le();
17302        __struct.rx_parse_err = buf.get_u16_le();
17303        __struct.tx_overflows = buf.get_u16_le();
17304        __struct.rx_overflows = buf.get_u16_le();
17305        __struct.tx_buf = buf.get_u8();
17306        __struct.rx_buf = buf.get_u8();
17307        Ok(__struct)
17308    }
17309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17310        let mut __tmp = BytesMut::new(bytes);
17311        #[allow(clippy::absurd_extreme_comparisons)]
17312        #[allow(unused_comparisons)]
17313        if __tmp.remaining() < Self::ENCODED_LEN {
17314            panic!(
17315                "buffer is too small (need {} bytes, but got {})",
17316                Self::ENCODED_LEN,
17317                __tmp.remaining(),
17318            )
17319        }
17320        __tmp.put_u64_le(self.timestamp);
17321        __tmp.put_u32_le(self.tx_rate);
17322        __tmp.put_u32_le(self.rx_rate);
17323        __tmp.put_u32_le(self.messages_sent);
17324        __tmp.put_u32_le(self.messages_received);
17325        __tmp.put_u32_le(self.messages_lost);
17326        __tmp.put_u16_le(self.rx_parse_err);
17327        __tmp.put_u16_le(self.tx_overflows);
17328        __tmp.put_u16_le(self.rx_overflows);
17329        __tmp.put_u8(self.tx_buf);
17330        __tmp.put_u8(self.rx_buf);
17331        if matches!(version, MavlinkVersion::V2) {
17332            let len = __tmp.len();
17333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17334        } else {
17335            __tmp.len()
17336        }
17337    }
17338}
17339#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17340#[doc = ""]
17341#[doc = "ID: 32"]
17342#[derive(Debug, Clone, PartialEq)]
17343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17345#[cfg_attr(feature = "ts", derive(TS))]
17346#[cfg_attr(feature = "ts", ts(export))]
17347pub struct LOCAL_POSITION_NED_DATA {
17348    #[doc = "Timestamp (time since system boot)."]
17349    pub time_boot_ms: u32,
17350    #[doc = "X Position"]
17351    pub x: f32,
17352    #[doc = "Y Position"]
17353    pub y: f32,
17354    #[doc = "Z Position"]
17355    pub z: f32,
17356    #[doc = "X Speed"]
17357    pub vx: f32,
17358    #[doc = "Y Speed"]
17359    pub vy: f32,
17360    #[doc = "Z Speed"]
17361    pub vz: f32,
17362}
17363impl LOCAL_POSITION_NED_DATA {
17364    pub const ENCODED_LEN: usize = 28usize;
17365    pub const DEFAULT: Self = Self {
17366        time_boot_ms: 0_u32,
17367        x: 0.0_f32,
17368        y: 0.0_f32,
17369        z: 0.0_f32,
17370        vx: 0.0_f32,
17371        vy: 0.0_f32,
17372        vz: 0.0_f32,
17373    };
17374    #[cfg(feature = "arbitrary")]
17375    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17376        use arbitrary::{Arbitrary, Unstructured};
17377        let mut buf = [0u8; 1024];
17378        rng.fill_bytes(&mut buf);
17379        let mut unstructured = Unstructured::new(&buf);
17380        Self::arbitrary(&mut unstructured).unwrap_or_default()
17381    }
17382}
17383impl Default for LOCAL_POSITION_NED_DATA {
17384    fn default() -> Self {
17385        Self::DEFAULT.clone()
17386    }
17387}
17388impl MessageData for LOCAL_POSITION_NED_DATA {
17389    type Message = MavMessage;
17390    const ID: u32 = 32u32;
17391    const NAME: &'static str = "LOCAL_POSITION_NED";
17392    const EXTRA_CRC: u8 = 185u8;
17393    const ENCODED_LEN: usize = 28usize;
17394    fn deser(
17395        _version: MavlinkVersion,
17396        __input: &[u8],
17397    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17398        let avail_len = __input.len();
17399        let mut payload_buf = [0; Self::ENCODED_LEN];
17400        let mut buf = if avail_len < Self::ENCODED_LEN {
17401            payload_buf[0..avail_len].copy_from_slice(__input);
17402            Bytes::new(&payload_buf)
17403        } else {
17404            Bytes::new(__input)
17405        };
17406        let mut __struct = Self::default();
17407        __struct.time_boot_ms = buf.get_u32_le();
17408        __struct.x = buf.get_f32_le();
17409        __struct.y = buf.get_f32_le();
17410        __struct.z = buf.get_f32_le();
17411        __struct.vx = buf.get_f32_le();
17412        __struct.vy = buf.get_f32_le();
17413        __struct.vz = buf.get_f32_le();
17414        Ok(__struct)
17415    }
17416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17417        let mut __tmp = BytesMut::new(bytes);
17418        #[allow(clippy::absurd_extreme_comparisons)]
17419        #[allow(unused_comparisons)]
17420        if __tmp.remaining() < Self::ENCODED_LEN {
17421            panic!(
17422                "buffer is too small (need {} bytes, but got {})",
17423                Self::ENCODED_LEN,
17424                __tmp.remaining(),
17425            )
17426        }
17427        __tmp.put_u32_le(self.time_boot_ms);
17428        __tmp.put_f32_le(self.x);
17429        __tmp.put_f32_le(self.y);
17430        __tmp.put_f32_le(self.z);
17431        __tmp.put_f32_le(self.vx);
17432        __tmp.put_f32_le(self.vy);
17433        __tmp.put_f32_le(self.vz);
17434        if matches!(version, MavlinkVersion::V2) {
17435            let len = __tmp.len();
17436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17437        } else {
17438            __tmp.len()
17439        }
17440    }
17441}
17442#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17443#[doc = ""]
17444#[doc = "ID: 64"]
17445#[derive(Debug, Clone, PartialEq)]
17446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17448#[cfg_attr(feature = "ts", derive(TS))]
17449#[cfg_attr(feature = "ts", ts(export))]
17450pub struct LOCAL_POSITION_NED_COV_DATA {
17451    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17452    pub time_usec: u64,
17453    #[doc = "X Position"]
17454    pub x: f32,
17455    #[doc = "Y Position"]
17456    pub y: f32,
17457    #[doc = "Z Position"]
17458    pub z: f32,
17459    #[doc = "X Speed"]
17460    pub vx: f32,
17461    #[doc = "Y Speed"]
17462    pub vy: f32,
17463    #[doc = "Z Speed"]
17464    pub vz: f32,
17465    #[doc = "X Acceleration"]
17466    pub ax: f32,
17467    #[doc = "Y Acceleration"]
17468    pub ay: f32,
17469    #[doc = "Z Acceleration"]
17470    pub az: f32,
17471    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17474    pub covariance: [f32; 45],
17475    #[doc = "Class id of the estimator this estimate originated from."]
17476    pub estimator_type: MavEstimatorType,
17477}
17478impl LOCAL_POSITION_NED_COV_DATA {
17479    pub const ENCODED_LEN: usize = 225usize;
17480    pub const DEFAULT: Self = Self {
17481        time_usec: 0_u64,
17482        x: 0.0_f32,
17483        y: 0.0_f32,
17484        z: 0.0_f32,
17485        vx: 0.0_f32,
17486        vy: 0.0_f32,
17487        vz: 0.0_f32,
17488        ax: 0.0_f32,
17489        ay: 0.0_f32,
17490        az: 0.0_f32,
17491        covariance: [0.0_f32; 45usize],
17492        estimator_type: MavEstimatorType::DEFAULT,
17493    };
17494    #[cfg(feature = "arbitrary")]
17495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17496        use arbitrary::{Arbitrary, Unstructured};
17497        let mut buf = [0u8; 1024];
17498        rng.fill_bytes(&mut buf);
17499        let mut unstructured = Unstructured::new(&buf);
17500        Self::arbitrary(&mut unstructured).unwrap_or_default()
17501    }
17502}
17503impl Default for LOCAL_POSITION_NED_COV_DATA {
17504    fn default() -> Self {
17505        Self::DEFAULT.clone()
17506    }
17507}
17508impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17509    type Message = MavMessage;
17510    const ID: u32 = 64u32;
17511    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17512    const EXTRA_CRC: u8 = 191u8;
17513    const ENCODED_LEN: usize = 225usize;
17514    fn deser(
17515        _version: MavlinkVersion,
17516        __input: &[u8],
17517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17518        let avail_len = __input.len();
17519        let mut payload_buf = [0; Self::ENCODED_LEN];
17520        let mut buf = if avail_len < Self::ENCODED_LEN {
17521            payload_buf[0..avail_len].copy_from_slice(__input);
17522            Bytes::new(&payload_buf)
17523        } else {
17524            Bytes::new(__input)
17525        };
17526        let mut __struct = Self::default();
17527        __struct.time_usec = buf.get_u64_le();
17528        __struct.x = buf.get_f32_le();
17529        __struct.y = buf.get_f32_le();
17530        __struct.z = buf.get_f32_le();
17531        __struct.vx = buf.get_f32_le();
17532        __struct.vy = buf.get_f32_le();
17533        __struct.vz = buf.get_f32_le();
17534        __struct.ax = buf.get_f32_le();
17535        __struct.ay = buf.get_f32_le();
17536        __struct.az = buf.get_f32_le();
17537        for v in &mut __struct.covariance {
17538            let val = buf.get_f32_le();
17539            *v = val;
17540        }
17541        let tmp = buf.get_u8();
17542        __struct.estimator_type =
17543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17544                enum_type: "MavEstimatorType",
17545                value: tmp as u64,
17546            })?;
17547        Ok(__struct)
17548    }
17549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17550        let mut __tmp = BytesMut::new(bytes);
17551        #[allow(clippy::absurd_extreme_comparisons)]
17552        #[allow(unused_comparisons)]
17553        if __tmp.remaining() < Self::ENCODED_LEN {
17554            panic!(
17555                "buffer is too small (need {} bytes, but got {})",
17556                Self::ENCODED_LEN,
17557                __tmp.remaining(),
17558            )
17559        }
17560        __tmp.put_u64_le(self.time_usec);
17561        __tmp.put_f32_le(self.x);
17562        __tmp.put_f32_le(self.y);
17563        __tmp.put_f32_le(self.z);
17564        __tmp.put_f32_le(self.vx);
17565        __tmp.put_f32_le(self.vy);
17566        __tmp.put_f32_le(self.vz);
17567        __tmp.put_f32_le(self.ax);
17568        __tmp.put_f32_le(self.ay);
17569        __tmp.put_f32_le(self.az);
17570        for val in &self.covariance {
17571            __tmp.put_f32_le(*val);
17572        }
17573        __tmp.put_u8(self.estimator_type as u8);
17574        if matches!(version, MavlinkVersion::V2) {
17575            let len = __tmp.len();
17576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17577        } else {
17578            __tmp.len()
17579        }
17580    }
17581}
17582#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17583#[doc = ""]
17584#[doc = "ID: 89"]
17585#[derive(Debug, Clone, PartialEq)]
17586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17588#[cfg_attr(feature = "ts", derive(TS))]
17589#[cfg_attr(feature = "ts", ts(export))]
17590pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17591    #[doc = "Timestamp (time since system boot)."]
17592    pub time_boot_ms: u32,
17593    #[doc = "X Position"]
17594    pub x: f32,
17595    #[doc = "Y Position"]
17596    pub y: f32,
17597    #[doc = "Z Position"]
17598    pub z: f32,
17599    #[doc = "Roll"]
17600    pub roll: f32,
17601    #[doc = "Pitch"]
17602    pub pitch: f32,
17603    #[doc = "Yaw"]
17604    pub yaw: f32,
17605}
17606impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17607    pub const ENCODED_LEN: usize = 28usize;
17608    pub const DEFAULT: Self = Self {
17609        time_boot_ms: 0_u32,
17610        x: 0.0_f32,
17611        y: 0.0_f32,
17612        z: 0.0_f32,
17613        roll: 0.0_f32,
17614        pitch: 0.0_f32,
17615        yaw: 0.0_f32,
17616    };
17617    #[cfg(feature = "arbitrary")]
17618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17619        use arbitrary::{Arbitrary, Unstructured};
17620        let mut buf = [0u8; 1024];
17621        rng.fill_bytes(&mut buf);
17622        let mut unstructured = Unstructured::new(&buf);
17623        Self::arbitrary(&mut unstructured).unwrap_or_default()
17624    }
17625}
17626impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17627    fn default() -> Self {
17628        Self::DEFAULT.clone()
17629    }
17630}
17631impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17632    type Message = MavMessage;
17633    const ID: u32 = 89u32;
17634    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17635    const EXTRA_CRC: u8 = 231u8;
17636    const ENCODED_LEN: usize = 28usize;
17637    fn deser(
17638        _version: MavlinkVersion,
17639        __input: &[u8],
17640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17641        let avail_len = __input.len();
17642        let mut payload_buf = [0; Self::ENCODED_LEN];
17643        let mut buf = if avail_len < Self::ENCODED_LEN {
17644            payload_buf[0..avail_len].copy_from_slice(__input);
17645            Bytes::new(&payload_buf)
17646        } else {
17647            Bytes::new(__input)
17648        };
17649        let mut __struct = Self::default();
17650        __struct.time_boot_ms = buf.get_u32_le();
17651        __struct.x = buf.get_f32_le();
17652        __struct.y = buf.get_f32_le();
17653        __struct.z = buf.get_f32_le();
17654        __struct.roll = buf.get_f32_le();
17655        __struct.pitch = buf.get_f32_le();
17656        __struct.yaw = buf.get_f32_le();
17657        Ok(__struct)
17658    }
17659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17660        let mut __tmp = BytesMut::new(bytes);
17661        #[allow(clippy::absurd_extreme_comparisons)]
17662        #[allow(unused_comparisons)]
17663        if __tmp.remaining() < Self::ENCODED_LEN {
17664            panic!(
17665                "buffer is too small (need {} bytes, but got {})",
17666                Self::ENCODED_LEN,
17667                __tmp.remaining(),
17668            )
17669        }
17670        __tmp.put_u32_le(self.time_boot_ms);
17671        __tmp.put_f32_le(self.x);
17672        __tmp.put_f32_le(self.y);
17673        __tmp.put_f32_le(self.z);
17674        __tmp.put_f32_le(self.roll);
17675        __tmp.put_f32_le(self.pitch);
17676        __tmp.put_f32_le(self.yaw);
17677        if matches!(version, MavlinkVersion::V2) {
17678            let len = __tmp.len();
17679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17680        } else {
17681            __tmp.len()
17682        }
17683    }
17684}
17685#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17686#[doc = ""]
17687#[doc = "ID: 268"]
17688#[derive(Debug, Clone, PartialEq)]
17689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17691#[cfg_attr(feature = "ts", derive(TS))]
17692#[cfg_attr(feature = "ts", ts(export))]
17693pub struct LOGGING_ACK_DATA {
17694    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17695    pub sequence: u16,
17696    #[doc = "system ID of the target"]
17697    pub target_system: u8,
17698    #[doc = "component ID of the target"]
17699    pub target_component: u8,
17700}
17701impl LOGGING_ACK_DATA {
17702    pub const ENCODED_LEN: usize = 4usize;
17703    pub const DEFAULT: Self = Self {
17704        sequence: 0_u16,
17705        target_system: 0_u8,
17706        target_component: 0_u8,
17707    };
17708    #[cfg(feature = "arbitrary")]
17709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17710        use arbitrary::{Arbitrary, Unstructured};
17711        let mut buf = [0u8; 1024];
17712        rng.fill_bytes(&mut buf);
17713        let mut unstructured = Unstructured::new(&buf);
17714        Self::arbitrary(&mut unstructured).unwrap_or_default()
17715    }
17716}
17717impl Default for LOGGING_ACK_DATA {
17718    fn default() -> Self {
17719        Self::DEFAULT.clone()
17720    }
17721}
17722impl MessageData for LOGGING_ACK_DATA {
17723    type Message = MavMessage;
17724    const ID: u32 = 268u32;
17725    const NAME: &'static str = "LOGGING_ACK";
17726    const EXTRA_CRC: u8 = 14u8;
17727    const ENCODED_LEN: usize = 4usize;
17728    fn deser(
17729        _version: MavlinkVersion,
17730        __input: &[u8],
17731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17732        let avail_len = __input.len();
17733        let mut payload_buf = [0; Self::ENCODED_LEN];
17734        let mut buf = if avail_len < Self::ENCODED_LEN {
17735            payload_buf[0..avail_len].copy_from_slice(__input);
17736            Bytes::new(&payload_buf)
17737        } else {
17738            Bytes::new(__input)
17739        };
17740        let mut __struct = Self::default();
17741        __struct.sequence = buf.get_u16_le();
17742        __struct.target_system = buf.get_u8();
17743        __struct.target_component = buf.get_u8();
17744        Ok(__struct)
17745    }
17746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17747        let mut __tmp = BytesMut::new(bytes);
17748        #[allow(clippy::absurd_extreme_comparisons)]
17749        #[allow(unused_comparisons)]
17750        if __tmp.remaining() < Self::ENCODED_LEN {
17751            panic!(
17752                "buffer is too small (need {} bytes, but got {})",
17753                Self::ENCODED_LEN,
17754                __tmp.remaining(),
17755            )
17756        }
17757        __tmp.put_u16_le(self.sequence);
17758        __tmp.put_u8(self.target_system);
17759        __tmp.put_u8(self.target_component);
17760        if matches!(version, MavlinkVersion::V2) {
17761            let len = __tmp.len();
17762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17763        } else {
17764            __tmp.len()
17765        }
17766    }
17767}
17768#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17769#[doc = ""]
17770#[doc = "ID: 266"]
17771#[derive(Debug, Clone, PartialEq)]
17772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17774#[cfg_attr(feature = "ts", derive(TS))]
17775#[cfg_attr(feature = "ts", ts(export))]
17776pub struct LOGGING_DATA_DATA {
17777    #[doc = "sequence number (can wrap)"]
17778    pub sequence: u16,
17779    #[doc = "system ID of the target"]
17780    pub target_system: u8,
17781    #[doc = "component ID of the target"]
17782    pub target_component: u8,
17783    #[doc = "data length"]
17784    pub length: u8,
17785    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17786    pub first_message_offset: u8,
17787    #[doc = "logged data"]
17788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17789    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17790    pub data: [u8; 249],
17791}
17792impl LOGGING_DATA_DATA {
17793    pub const ENCODED_LEN: usize = 255usize;
17794    pub const DEFAULT: Self = Self {
17795        sequence: 0_u16,
17796        target_system: 0_u8,
17797        target_component: 0_u8,
17798        length: 0_u8,
17799        first_message_offset: 0_u8,
17800        data: [0_u8; 249usize],
17801    };
17802    #[cfg(feature = "arbitrary")]
17803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17804        use arbitrary::{Arbitrary, Unstructured};
17805        let mut buf = [0u8; 1024];
17806        rng.fill_bytes(&mut buf);
17807        let mut unstructured = Unstructured::new(&buf);
17808        Self::arbitrary(&mut unstructured).unwrap_or_default()
17809    }
17810}
17811impl Default for LOGGING_DATA_DATA {
17812    fn default() -> Self {
17813        Self::DEFAULT.clone()
17814    }
17815}
17816impl MessageData for LOGGING_DATA_DATA {
17817    type Message = MavMessage;
17818    const ID: u32 = 266u32;
17819    const NAME: &'static str = "LOGGING_DATA";
17820    const EXTRA_CRC: u8 = 193u8;
17821    const ENCODED_LEN: usize = 255usize;
17822    fn deser(
17823        _version: MavlinkVersion,
17824        __input: &[u8],
17825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17826        let avail_len = __input.len();
17827        let mut payload_buf = [0; Self::ENCODED_LEN];
17828        let mut buf = if avail_len < Self::ENCODED_LEN {
17829            payload_buf[0..avail_len].copy_from_slice(__input);
17830            Bytes::new(&payload_buf)
17831        } else {
17832            Bytes::new(__input)
17833        };
17834        let mut __struct = Self::default();
17835        __struct.sequence = buf.get_u16_le();
17836        __struct.target_system = buf.get_u8();
17837        __struct.target_component = buf.get_u8();
17838        __struct.length = buf.get_u8();
17839        __struct.first_message_offset = buf.get_u8();
17840        for v in &mut __struct.data {
17841            let val = buf.get_u8();
17842            *v = val;
17843        }
17844        Ok(__struct)
17845    }
17846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17847        let mut __tmp = BytesMut::new(bytes);
17848        #[allow(clippy::absurd_extreme_comparisons)]
17849        #[allow(unused_comparisons)]
17850        if __tmp.remaining() < Self::ENCODED_LEN {
17851            panic!(
17852                "buffer is too small (need {} bytes, but got {})",
17853                Self::ENCODED_LEN,
17854                __tmp.remaining(),
17855            )
17856        }
17857        __tmp.put_u16_le(self.sequence);
17858        __tmp.put_u8(self.target_system);
17859        __tmp.put_u8(self.target_component);
17860        __tmp.put_u8(self.length);
17861        __tmp.put_u8(self.first_message_offset);
17862        for val in &self.data {
17863            __tmp.put_u8(*val);
17864        }
17865        if matches!(version, MavlinkVersion::V2) {
17866            let len = __tmp.len();
17867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17868        } else {
17869            __tmp.len()
17870        }
17871    }
17872}
17873#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17874#[doc = ""]
17875#[doc = "ID: 267"]
17876#[derive(Debug, Clone, PartialEq)]
17877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17879#[cfg_attr(feature = "ts", derive(TS))]
17880#[cfg_attr(feature = "ts", ts(export))]
17881pub struct LOGGING_DATA_ACKED_DATA {
17882    #[doc = "sequence number (can wrap)"]
17883    pub sequence: u16,
17884    #[doc = "system ID of the target"]
17885    pub target_system: u8,
17886    #[doc = "component ID of the target"]
17887    pub target_component: u8,
17888    #[doc = "data length"]
17889    pub length: u8,
17890    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17891    pub first_message_offset: u8,
17892    #[doc = "logged data"]
17893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17894    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17895    pub data: [u8; 249],
17896}
17897impl LOGGING_DATA_ACKED_DATA {
17898    pub const ENCODED_LEN: usize = 255usize;
17899    pub const DEFAULT: Self = Self {
17900        sequence: 0_u16,
17901        target_system: 0_u8,
17902        target_component: 0_u8,
17903        length: 0_u8,
17904        first_message_offset: 0_u8,
17905        data: [0_u8; 249usize],
17906    };
17907    #[cfg(feature = "arbitrary")]
17908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17909        use arbitrary::{Arbitrary, Unstructured};
17910        let mut buf = [0u8; 1024];
17911        rng.fill_bytes(&mut buf);
17912        let mut unstructured = Unstructured::new(&buf);
17913        Self::arbitrary(&mut unstructured).unwrap_or_default()
17914    }
17915}
17916impl Default for LOGGING_DATA_ACKED_DATA {
17917    fn default() -> Self {
17918        Self::DEFAULT.clone()
17919    }
17920}
17921impl MessageData for LOGGING_DATA_ACKED_DATA {
17922    type Message = MavMessage;
17923    const ID: u32 = 267u32;
17924    const NAME: &'static str = "LOGGING_DATA_ACKED";
17925    const EXTRA_CRC: u8 = 35u8;
17926    const ENCODED_LEN: usize = 255usize;
17927    fn deser(
17928        _version: MavlinkVersion,
17929        __input: &[u8],
17930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17931        let avail_len = __input.len();
17932        let mut payload_buf = [0; Self::ENCODED_LEN];
17933        let mut buf = if avail_len < Self::ENCODED_LEN {
17934            payload_buf[0..avail_len].copy_from_slice(__input);
17935            Bytes::new(&payload_buf)
17936        } else {
17937            Bytes::new(__input)
17938        };
17939        let mut __struct = Self::default();
17940        __struct.sequence = buf.get_u16_le();
17941        __struct.target_system = buf.get_u8();
17942        __struct.target_component = buf.get_u8();
17943        __struct.length = buf.get_u8();
17944        __struct.first_message_offset = buf.get_u8();
17945        for v in &mut __struct.data {
17946            let val = buf.get_u8();
17947            *v = val;
17948        }
17949        Ok(__struct)
17950    }
17951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17952        let mut __tmp = BytesMut::new(bytes);
17953        #[allow(clippy::absurd_extreme_comparisons)]
17954        #[allow(unused_comparisons)]
17955        if __tmp.remaining() < Self::ENCODED_LEN {
17956            panic!(
17957                "buffer is too small (need {} bytes, but got {})",
17958                Self::ENCODED_LEN,
17959                __tmp.remaining(),
17960            )
17961        }
17962        __tmp.put_u16_le(self.sequence);
17963        __tmp.put_u8(self.target_system);
17964        __tmp.put_u8(self.target_component);
17965        __tmp.put_u8(self.length);
17966        __tmp.put_u8(self.first_message_offset);
17967        for val in &self.data {
17968            __tmp.put_u8(*val);
17969        }
17970        if matches!(version, MavlinkVersion::V2) {
17971            let len = __tmp.len();
17972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17973        } else {
17974            __tmp.len()
17975        }
17976    }
17977}
17978#[doc = "Reply to LOG_REQUEST_DATA."]
17979#[doc = ""]
17980#[doc = "ID: 120"]
17981#[derive(Debug, Clone, PartialEq)]
17982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17984#[cfg_attr(feature = "ts", derive(TS))]
17985#[cfg_attr(feature = "ts", ts(export))]
17986pub struct LOG_DATA_DATA {
17987    #[doc = "Offset into the log"]
17988    pub ofs: u32,
17989    #[doc = "Log id (from LOG_ENTRY reply)"]
17990    pub id: u16,
17991    #[doc = "Number of bytes (zero for end of log)"]
17992    pub count: u8,
17993    #[doc = "log data"]
17994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17996    pub data: [u8; 90],
17997}
17998impl LOG_DATA_DATA {
17999    pub const ENCODED_LEN: usize = 97usize;
18000    pub const DEFAULT: Self = Self {
18001        ofs: 0_u32,
18002        id: 0_u16,
18003        count: 0_u8,
18004        data: [0_u8; 90usize],
18005    };
18006    #[cfg(feature = "arbitrary")]
18007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18008        use arbitrary::{Arbitrary, Unstructured};
18009        let mut buf = [0u8; 1024];
18010        rng.fill_bytes(&mut buf);
18011        let mut unstructured = Unstructured::new(&buf);
18012        Self::arbitrary(&mut unstructured).unwrap_or_default()
18013    }
18014}
18015impl Default for LOG_DATA_DATA {
18016    fn default() -> Self {
18017        Self::DEFAULT.clone()
18018    }
18019}
18020impl MessageData for LOG_DATA_DATA {
18021    type Message = MavMessage;
18022    const ID: u32 = 120u32;
18023    const NAME: &'static str = "LOG_DATA";
18024    const EXTRA_CRC: u8 = 134u8;
18025    const ENCODED_LEN: usize = 97usize;
18026    fn deser(
18027        _version: MavlinkVersion,
18028        __input: &[u8],
18029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18030        let avail_len = __input.len();
18031        let mut payload_buf = [0; Self::ENCODED_LEN];
18032        let mut buf = if avail_len < Self::ENCODED_LEN {
18033            payload_buf[0..avail_len].copy_from_slice(__input);
18034            Bytes::new(&payload_buf)
18035        } else {
18036            Bytes::new(__input)
18037        };
18038        let mut __struct = Self::default();
18039        __struct.ofs = buf.get_u32_le();
18040        __struct.id = buf.get_u16_le();
18041        __struct.count = buf.get_u8();
18042        for v in &mut __struct.data {
18043            let val = buf.get_u8();
18044            *v = val;
18045        }
18046        Ok(__struct)
18047    }
18048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18049        let mut __tmp = BytesMut::new(bytes);
18050        #[allow(clippy::absurd_extreme_comparisons)]
18051        #[allow(unused_comparisons)]
18052        if __tmp.remaining() < Self::ENCODED_LEN {
18053            panic!(
18054                "buffer is too small (need {} bytes, but got {})",
18055                Self::ENCODED_LEN,
18056                __tmp.remaining(),
18057            )
18058        }
18059        __tmp.put_u32_le(self.ofs);
18060        __tmp.put_u16_le(self.id);
18061        __tmp.put_u8(self.count);
18062        for val in &self.data {
18063            __tmp.put_u8(*val);
18064        }
18065        if matches!(version, MavlinkVersion::V2) {
18066            let len = __tmp.len();
18067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18068        } else {
18069            __tmp.len()
18070        }
18071    }
18072}
18073#[doc = "Reply to LOG_REQUEST_LIST."]
18074#[doc = ""]
18075#[doc = "ID: 118"]
18076#[derive(Debug, Clone, PartialEq)]
18077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18079#[cfg_attr(feature = "ts", derive(TS))]
18080#[cfg_attr(feature = "ts", ts(export))]
18081pub struct LOG_ENTRY_DATA {
18082    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18083    pub time_utc: u32,
18084    #[doc = "Size of the log (may be approximate)"]
18085    pub size: u32,
18086    #[doc = "Log id"]
18087    pub id: u16,
18088    #[doc = "Total number of logs"]
18089    pub num_logs: u16,
18090    #[doc = "High log number"]
18091    pub last_log_num: u16,
18092}
18093impl LOG_ENTRY_DATA {
18094    pub const ENCODED_LEN: usize = 14usize;
18095    pub const DEFAULT: Self = Self {
18096        time_utc: 0_u32,
18097        size: 0_u32,
18098        id: 0_u16,
18099        num_logs: 0_u16,
18100        last_log_num: 0_u16,
18101    };
18102    #[cfg(feature = "arbitrary")]
18103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18104        use arbitrary::{Arbitrary, Unstructured};
18105        let mut buf = [0u8; 1024];
18106        rng.fill_bytes(&mut buf);
18107        let mut unstructured = Unstructured::new(&buf);
18108        Self::arbitrary(&mut unstructured).unwrap_or_default()
18109    }
18110}
18111impl Default for LOG_ENTRY_DATA {
18112    fn default() -> Self {
18113        Self::DEFAULT.clone()
18114    }
18115}
18116impl MessageData for LOG_ENTRY_DATA {
18117    type Message = MavMessage;
18118    const ID: u32 = 118u32;
18119    const NAME: &'static str = "LOG_ENTRY";
18120    const EXTRA_CRC: u8 = 56u8;
18121    const ENCODED_LEN: usize = 14usize;
18122    fn deser(
18123        _version: MavlinkVersion,
18124        __input: &[u8],
18125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18126        let avail_len = __input.len();
18127        let mut payload_buf = [0; Self::ENCODED_LEN];
18128        let mut buf = if avail_len < Self::ENCODED_LEN {
18129            payload_buf[0..avail_len].copy_from_slice(__input);
18130            Bytes::new(&payload_buf)
18131        } else {
18132            Bytes::new(__input)
18133        };
18134        let mut __struct = Self::default();
18135        __struct.time_utc = buf.get_u32_le();
18136        __struct.size = buf.get_u32_le();
18137        __struct.id = buf.get_u16_le();
18138        __struct.num_logs = buf.get_u16_le();
18139        __struct.last_log_num = buf.get_u16_le();
18140        Ok(__struct)
18141    }
18142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18143        let mut __tmp = BytesMut::new(bytes);
18144        #[allow(clippy::absurd_extreme_comparisons)]
18145        #[allow(unused_comparisons)]
18146        if __tmp.remaining() < Self::ENCODED_LEN {
18147            panic!(
18148                "buffer is too small (need {} bytes, but got {})",
18149                Self::ENCODED_LEN,
18150                __tmp.remaining(),
18151            )
18152        }
18153        __tmp.put_u32_le(self.time_utc);
18154        __tmp.put_u32_le(self.size);
18155        __tmp.put_u16_le(self.id);
18156        __tmp.put_u16_le(self.num_logs);
18157        __tmp.put_u16_le(self.last_log_num);
18158        if matches!(version, MavlinkVersion::V2) {
18159            let len = __tmp.len();
18160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18161        } else {
18162            __tmp.len()
18163        }
18164    }
18165}
18166#[doc = "Erase all logs."]
18167#[doc = ""]
18168#[doc = "ID: 121"]
18169#[derive(Debug, Clone, PartialEq)]
18170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18172#[cfg_attr(feature = "ts", derive(TS))]
18173#[cfg_attr(feature = "ts", ts(export))]
18174pub struct LOG_ERASE_DATA {
18175    #[doc = "System ID"]
18176    pub target_system: u8,
18177    #[doc = "Component ID"]
18178    pub target_component: u8,
18179}
18180impl LOG_ERASE_DATA {
18181    pub const ENCODED_LEN: usize = 2usize;
18182    pub const DEFAULT: Self = Self {
18183        target_system: 0_u8,
18184        target_component: 0_u8,
18185    };
18186    #[cfg(feature = "arbitrary")]
18187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18188        use arbitrary::{Arbitrary, Unstructured};
18189        let mut buf = [0u8; 1024];
18190        rng.fill_bytes(&mut buf);
18191        let mut unstructured = Unstructured::new(&buf);
18192        Self::arbitrary(&mut unstructured).unwrap_or_default()
18193    }
18194}
18195impl Default for LOG_ERASE_DATA {
18196    fn default() -> Self {
18197        Self::DEFAULT.clone()
18198    }
18199}
18200impl MessageData for LOG_ERASE_DATA {
18201    type Message = MavMessage;
18202    const ID: u32 = 121u32;
18203    const NAME: &'static str = "LOG_ERASE";
18204    const EXTRA_CRC: u8 = 237u8;
18205    const ENCODED_LEN: usize = 2usize;
18206    fn deser(
18207        _version: MavlinkVersion,
18208        __input: &[u8],
18209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18210        let avail_len = __input.len();
18211        let mut payload_buf = [0; Self::ENCODED_LEN];
18212        let mut buf = if avail_len < Self::ENCODED_LEN {
18213            payload_buf[0..avail_len].copy_from_slice(__input);
18214            Bytes::new(&payload_buf)
18215        } else {
18216            Bytes::new(__input)
18217        };
18218        let mut __struct = Self::default();
18219        __struct.target_system = buf.get_u8();
18220        __struct.target_component = buf.get_u8();
18221        Ok(__struct)
18222    }
18223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18224        let mut __tmp = BytesMut::new(bytes);
18225        #[allow(clippy::absurd_extreme_comparisons)]
18226        #[allow(unused_comparisons)]
18227        if __tmp.remaining() < Self::ENCODED_LEN {
18228            panic!(
18229                "buffer is too small (need {} bytes, but got {})",
18230                Self::ENCODED_LEN,
18231                __tmp.remaining(),
18232            )
18233        }
18234        __tmp.put_u8(self.target_system);
18235        __tmp.put_u8(self.target_component);
18236        if matches!(version, MavlinkVersion::V2) {
18237            let len = __tmp.len();
18238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18239        } else {
18240            __tmp.len()
18241        }
18242    }
18243}
18244#[doc = "Request a chunk of a log."]
18245#[doc = ""]
18246#[doc = "ID: 119"]
18247#[derive(Debug, Clone, PartialEq)]
18248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18250#[cfg_attr(feature = "ts", derive(TS))]
18251#[cfg_attr(feature = "ts", ts(export))]
18252pub struct LOG_REQUEST_DATA_DATA {
18253    #[doc = "Offset into the log"]
18254    pub ofs: u32,
18255    #[doc = "Number of bytes"]
18256    pub count: u32,
18257    #[doc = "Log id (from LOG_ENTRY reply)"]
18258    pub id: u16,
18259    #[doc = "System ID"]
18260    pub target_system: u8,
18261    #[doc = "Component ID"]
18262    pub target_component: u8,
18263}
18264impl LOG_REQUEST_DATA_DATA {
18265    pub const ENCODED_LEN: usize = 12usize;
18266    pub const DEFAULT: Self = Self {
18267        ofs: 0_u32,
18268        count: 0_u32,
18269        id: 0_u16,
18270        target_system: 0_u8,
18271        target_component: 0_u8,
18272    };
18273    #[cfg(feature = "arbitrary")]
18274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18275        use arbitrary::{Arbitrary, Unstructured};
18276        let mut buf = [0u8; 1024];
18277        rng.fill_bytes(&mut buf);
18278        let mut unstructured = Unstructured::new(&buf);
18279        Self::arbitrary(&mut unstructured).unwrap_or_default()
18280    }
18281}
18282impl Default for LOG_REQUEST_DATA_DATA {
18283    fn default() -> Self {
18284        Self::DEFAULT.clone()
18285    }
18286}
18287impl MessageData for LOG_REQUEST_DATA_DATA {
18288    type Message = MavMessage;
18289    const ID: u32 = 119u32;
18290    const NAME: &'static str = "LOG_REQUEST_DATA";
18291    const EXTRA_CRC: u8 = 116u8;
18292    const ENCODED_LEN: usize = 12usize;
18293    fn deser(
18294        _version: MavlinkVersion,
18295        __input: &[u8],
18296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18297        let avail_len = __input.len();
18298        let mut payload_buf = [0; Self::ENCODED_LEN];
18299        let mut buf = if avail_len < Self::ENCODED_LEN {
18300            payload_buf[0..avail_len].copy_from_slice(__input);
18301            Bytes::new(&payload_buf)
18302        } else {
18303            Bytes::new(__input)
18304        };
18305        let mut __struct = Self::default();
18306        __struct.ofs = buf.get_u32_le();
18307        __struct.count = buf.get_u32_le();
18308        __struct.id = buf.get_u16_le();
18309        __struct.target_system = buf.get_u8();
18310        __struct.target_component = buf.get_u8();
18311        Ok(__struct)
18312    }
18313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18314        let mut __tmp = BytesMut::new(bytes);
18315        #[allow(clippy::absurd_extreme_comparisons)]
18316        #[allow(unused_comparisons)]
18317        if __tmp.remaining() < Self::ENCODED_LEN {
18318            panic!(
18319                "buffer is too small (need {} bytes, but got {})",
18320                Self::ENCODED_LEN,
18321                __tmp.remaining(),
18322            )
18323        }
18324        __tmp.put_u32_le(self.ofs);
18325        __tmp.put_u32_le(self.count);
18326        __tmp.put_u16_le(self.id);
18327        __tmp.put_u8(self.target_system);
18328        __tmp.put_u8(self.target_component);
18329        if matches!(version, MavlinkVersion::V2) {
18330            let len = __tmp.len();
18331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18332        } else {
18333            __tmp.len()
18334        }
18335    }
18336}
18337#[doc = "Stop log transfer and resume normal logging."]
18338#[doc = ""]
18339#[doc = "ID: 122"]
18340#[derive(Debug, Clone, PartialEq)]
18341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18343#[cfg_attr(feature = "ts", derive(TS))]
18344#[cfg_attr(feature = "ts", ts(export))]
18345pub struct LOG_REQUEST_END_DATA {
18346    #[doc = "System ID"]
18347    pub target_system: u8,
18348    #[doc = "Component ID"]
18349    pub target_component: u8,
18350}
18351impl LOG_REQUEST_END_DATA {
18352    pub const ENCODED_LEN: usize = 2usize;
18353    pub const DEFAULT: Self = Self {
18354        target_system: 0_u8,
18355        target_component: 0_u8,
18356    };
18357    #[cfg(feature = "arbitrary")]
18358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18359        use arbitrary::{Arbitrary, Unstructured};
18360        let mut buf = [0u8; 1024];
18361        rng.fill_bytes(&mut buf);
18362        let mut unstructured = Unstructured::new(&buf);
18363        Self::arbitrary(&mut unstructured).unwrap_or_default()
18364    }
18365}
18366impl Default for LOG_REQUEST_END_DATA {
18367    fn default() -> Self {
18368        Self::DEFAULT.clone()
18369    }
18370}
18371impl MessageData for LOG_REQUEST_END_DATA {
18372    type Message = MavMessage;
18373    const ID: u32 = 122u32;
18374    const NAME: &'static str = "LOG_REQUEST_END";
18375    const EXTRA_CRC: u8 = 203u8;
18376    const ENCODED_LEN: usize = 2usize;
18377    fn deser(
18378        _version: MavlinkVersion,
18379        __input: &[u8],
18380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18381        let avail_len = __input.len();
18382        let mut payload_buf = [0; Self::ENCODED_LEN];
18383        let mut buf = if avail_len < Self::ENCODED_LEN {
18384            payload_buf[0..avail_len].copy_from_slice(__input);
18385            Bytes::new(&payload_buf)
18386        } else {
18387            Bytes::new(__input)
18388        };
18389        let mut __struct = Self::default();
18390        __struct.target_system = buf.get_u8();
18391        __struct.target_component = buf.get_u8();
18392        Ok(__struct)
18393    }
18394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18395        let mut __tmp = BytesMut::new(bytes);
18396        #[allow(clippy::absurd_extreme_comparisons)]
18397        #[allow(unused_comparisons)]
18398        if __tmp.remaining() < Self::ENCODED_LEN {
18399            panic!(
18400                "buffer is too small (need {} bytes, but got {})",
18401                Self::ENCODED_LEN,
18402                __tmp.remaining(),
18403            )
18404        }
18405        __tmp.put_u8(self.target_system);
18406        __tmp.put_u8(self.target_component);
18407        if matches!(version, MavlinkVersion::V2) {
18408            let len = __tmp.len();
18409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18410        } else {
18411            __tmp.len()
18412        }
18413    }
18414}
18415#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18416#[doc = ""]
18417#[doc = "ID: 117"]
18418#[derive(Debug, Clone, PartialEq)]
18419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18421#[cfg_attr(feature = "ts", derive(TS))]
18422#[cfg_attr(feature = "ts", ts(export))]
18423pub struct LOG_REQUEST_LIST_DATA {
18424    #[doc = "First log id (0 for first available)"]
18425    pub start: u16,
18426    #[doc = "Last log id (0xffff for last available)"]
18427    pub end: u16,
18428    #[doc = "System ID"]
18429    pub target_system: u8,
18430    #[doc = "Component ID"]
18431    pub target_component: u8,
18432}
18433impl LOG_REQUEST_LIST_DATA {
18434    pub const ENCODED_LEN: usize = 6usize;
18435    pub const DEFAULT: Self = Self {
18436        start: 0_u16,
18437        end: 0_u16,
18438        target_system: 0_u8,
18439        target_component: 0_u8,
18440    };
18441    #[cfg(feature = "arbitrary")]
18442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18443        use arbitrary::{Arbitrary, Unstructured};
18444        let mut buf = [0u8; 1024];
18445        rng.fill_bytes(&mut buf);
18446        let mut unstructured = Unstructured::new(&buf);
18447        Self::arbitrary(&mut unstructured).unwrap_or_default()
18448    }
18449}
18450impl Default for LOG_REQUEST_LIST_DATA {
18451    fn default() -> Self {
18452        Self::DEFAULT.clone()
18453    }
18454}
18455impl MessageData for LOG_REQUEST_LIST_DATA {
18456    type Message = MavMessage;
18457    const ID: u32 = 117u32;
18458    const NAME: &'static str = "LOG_REQUEST_LIST";
18459    const EXTRA_CRC: u8 = 128u8;
18460    const ENCODED_LEN: usize = 6usize;
18461    fn deser(
18462        _version: MavlinkVersion,
18463        __input: &[u8],
18464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18465        let avail_len = __input.len();
18466        let mut payload_buf = [0; Self::ENCODED_LEN];
18467        let mut buf = if avail_len < Self::ENCODED_LEN {
18468            payload_buf[0..avail_len].copy_from_slice(__input);
18469            Bytes::new(&payload_buf)
18470        } else {
18471            Bytes::new(__input)
18472        };
18473        let mut __struct = Self::default();
18474        __struct.start = buf.get_u16_le();
18475        __struct.end = buf.get_u16_le();
18476        __struct.target_system = buf.get_u8();
18477        __struct.target_component = buf.get_u8();
18478        Ok(__struct)
18479    }
18480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18481        let mut __tmp = BytesMut::new(bytes);
18482        #[allow(clippy::absurd_extreme_comparisons)]
18483        #[allow(unused_comparisons)]
18484        if __tmp.remaining() < Self::ENCODED_LEN {
18485            panic!(
18486                "buffer is too small (need {} bytes, but got {})",
18487                Self::ENCODED_LEN,
18488                __tmp.remaining(),
18489            )
18490        }
18491        __tmp.put_u16_le(self.start);
18492        __tmp.put_u16_le(self.end);
18493        __tmp.put_u8(self.target_system);
18494        __tmp.put_u8(self.target_component);
18495        if matches!(version, MavlinkVersion::V2) {
18496            let len = __tmp.len();
18497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18498        } else {
18499            __tmp.len()
18500        }
18501    }
18502}
18503#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18504#[doc = ""]
18505#[doc = "ID: 192"]
18506#[derive(Debug, Clone, PartialEq)]
18507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18509#[cfg_attr(feature = "ts", derive(TS))]
18510#[cfg_attr(feature = "ts", ts(export))]
18511pub struct MAG_CAL_REPORT_DATA {
18512    #[doc = "RMS milligauss residuals."]
18513    pub fitness: f32,
18514    #[doc = "X offset."]
18515    pub ofs_x: f32,
18516    #[doc = "Y offset."]
18517    pub ofs_y: f32,
18518    #[doc = "Z offset."]
18519    pub ofs_z: f32,
18520    #[doc = "X diagonal (matrix 11)."]
18521    pub diag_x: f32,
18522    #[doc = "Y diagonal (matrix 22)."]
18523    pub diag_y: f32,
18524    #[doc = "Z diagonal (matrix 33)."]
18525    pub diag_z: f32,
18526    #[doc = "X off-diagonal (matrix 12 and 21)."]
18527    pub offdiag_x: f32,
18528    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18529    pub offdiag_y: f32,
18530    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18531    pub offdiag_z: f32,
18532    #[doc = "Compass being calibrated."]
18533    pub compass_id: u8,
18534    #[doc = "Bitmask of compasses being calibrated."]
18535    pub cal_mask: u8,
18536    #[doc = "Calibration Status."]
18537    pub cal_status: MagCalStatus,
18538    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18539    pub autosaved: u8,
18540    #[doc = "Confidence in orientation (higher is better)."]
18541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18542    pub orientation_confidence: f32,
18543    #[doc = "orientation before calibration."]
18544    #[cfg_attr(feature = "serde", serde(default))]
18545    pub old_orientation: MavSensorOrientation,
18546    #[doc = "orientation after calibration."]
18547    #[cfg_attr(feature = "serde", serde(default))]
18548    pub new_orientation: MavSensorOrientation,
18549    #[doc = "field radius correction factor"]
18550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18551    pub scale_factor: f32,
18552}
18553impl MAG_CAL_REPORT_DATA {
18554    pub const ENCODED_LEN: usize = 54usize;
18555    pub const DEFAULT: Self = Self {
18556        fitness: 0.0_f32,
18557        ofs_x: 0.0_f32,
18558        ofs_y: 0.0_f32,
18559        ofs_z: 0.0_f32,
18560        diag_x: 0.0_f32,
18561        diag_y: 0.0_f32,
18562        diag_z: 0.0_f32,
18563        offdiag_x: 0.0_f32,
18564        offdiag_y: 0.0_f32,
18565        offdiag_z: 0.0_f32,
18566        compass_id: 0_u8,
18567        cal_mask: 0_u8,
18568        cal_status: MagCalStatus::DEFAULT,
18569        autosaved: 0_u8,
18570        orientation_confidence: 0.0_f32,
18571        old_orientation: MavSensorOrientation::DEFAULT,
18572        new_orientation: MavSensorOrientation::DEFAULT,
18573        scale_factor: 0.0_f32,
18574    };
18575    #[cfg(feature = "arbitrary")]
18576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18577        use arbitrary::{Arbitrary, Unstructured};
18578        let mut buf = [0u8; 1024];
18579        rng.fill_bytes(&mut buf);
18580        let mut unstructured = Unstructured::new(&buf);
18581        Self::arbitrary(&mut unstructured).unwrap_or_default()
18582    }
18583}
18584impl Default for MAG_CAL_REPORT_DATA {
18585    fn default() -> Self {
18586        Self::DEFAULT.clone()
18587    }
18588}
18589impl MessageData for MAG_CAL_REPORT_DATA {
18590    type Message = MavMessage;
18591    const ID: u32 = 192u32;
18592    const NAME: &'static str = "MAG_CAL_REPORT";
18593    const EXTRA_CRC: u8 = 36u8;
18594    const ENCODED_LEN: usize = 54usize;
18595    fn deser(
18596        _version: MavlinkVersion,
18597        __input: &[u8],
18598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18599        let avail_len = __input.len();
18600        let mut payload_buf = [0; Self::ENCODED_LEN];
18601        let mut buf = if avail_len < Self::ENCODED_LEN {
18602            payload_buf[0..avail_len].copy_from_slice(__input);
18603            Bytes::new(&payload_buf)
18604        } else {
18605            Bytes::new(__input)
18606        };
18607        let mut __struct = Self::default();
18608        __struct.fitness = buf.get_f32_le();
18609        __struct.ofs_x = buf.get_f32_le();
18610        __struct.ofs_y = buf.get_f32_le();
18611        __struct.ofs_z = buf.get_f32_le();
18612        __struct.diag_x = buf.get_f32_le();
18613        __struct.diag_y = buf.get_f32_le();
18614        __struct.diag_z = buf.get_f32_le();
18615        __struct.offdiag_x = buf.get_f32_le();
18616        __struct.offdiag_y = buf.get_f32_le();
18617        __struct.offdiag_z = buf.get_f32_le();
18618        __struct.compass_id = buf.get_u8();
18619        __struct.cal_mask = buf.get_u8();
18620        let tmp = buf.get_u8();
18621        __struct.cal_status =
18622            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18623                enum_type: "MagCalStatus",
18624                value: tmp as u64,
18625            })?;
18626        __struct.autosaved = buf.get_u8();
18627        __struct.orientation_confidence = buf.get_f32_le();
18628        let tmp = buf.get_u8();
18629        __struct.old_orientation =
18630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18631                enum_type: "MavSensorOrientation",
18632                value: tmp as u64,
18633            })?;
18634        let tmp = buf.get_u8();
18635        __struct.new_orientation =
18636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18637                enum_type: "MavSensorOrientation",
18638                value: tmp as u64,
18639            })?;
18640        __struct.scale_factor = buf.get_f32_le();
18641        Ok(__struct)
18642    }
18643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18644        let mut __tmp = BytesMut::new(bytes);
18645        #[allow(clippy::absurd_extreme_comparisons)]
18646        #[allow(unused_comparisons)]
18647        if __tmp.remaining() < Self::ENCODED_LEN {
18648            panic!(
18649                "buffer is too small (need {} bytes, but got {})",
18650                Self::ENCODED_LEN,
18651                __tmp.remaining(),
18652            )
18653        }
18654        __tmp.put_f32_le(self.fitness);
18655        __tmp.put_f32_le(self.ofs_x);
18656        __tmp.put_f32_le(self.ofs_y);
18657        __tmp.put_f32_le(self.ofs_z);
18658        __tmp.put_f32_le(self.diag_x);
18659        __tmp.put_f32_le(self.diag_y);
18660        __tmp.put_f32_le(self.diag_z);
18661        __tmp.put_f32_le(self.offdiag_x);
18662        __tmp.put_f32_le(self.offdiag_y);
18663        __tmp.put_f32_le(self.offdiag_z);
18664        __tmp.put_u8(self.compass_id);
18665        __tmp.put_u8(self.cal_mask);
18666        __tmp.put_u8(self.cal_status as u8);
18667        __tmp.put_u8(self.autosaved);
18668        if matches!(version, MavlinkVersion::V2) {
18669            __tmp.put_f32_le(self.orientation_confidence);
18670            __tmp.put_u8(self.old_orientation as u8);
18671            __tmp.put_u8(self.new_orientation as u8);
18672            __tmp.put_f32_le(self.scale_factor);
18673            let len = __tmp.len();
18674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18675        } else {
18676            __tmp.len()
18677        }
18678    }
18679}
18680#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18681#[doc = ""]
18682#[doc = "ID: 69"]
18683#[derive(Debug, Clone, PartialEq)]
18684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18686#[cfg_attr(feature = "ts", derive(TS))]
18687#[cfg_attr(feature = "ts", ts(export))]
18688pub struct MANUAL_CONTROL_DATA {
18689    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18690    pub x: i16,
18691    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18692    pub y: i16,
18693    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18694    pub z: i16,
18695    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18696    pub r: i16,
18697    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18698    pub buttons: u16,
18699    #[doc = "The system to be controlled."]
18700    pub target: u8,
18701    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18703    pub buttons2: u16,
18704    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18706    pub enabled_extensions: u8,
18707    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18709    pub s: i16,
18710    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18712    pub t: i16,
18713    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18715    pub aux1: i16,
18716    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18718    pub aux2: i16,
18719    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18720    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18721    pub aux3: i16,
18722    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18723    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18724    pub aux4: i16,
18725    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18727    pub aux5: i16,
18728    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18729    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18730    pub aux6: i16,
18731}
18732impl MANUAL_CONTROL_DATA {
18733    pub const ENCODED_LEN: usize = 30usize;
18734    pub const DEFAULT: Self = Self {
18735        x: 0_i16,
18736        y: 0_i16,
18737        z: 0_i16,
18738        r: 0_i16,
18739        buttons: 0_u16,
18740        target: 0_u8,
18741        buttons2: 0_u16,
18742        enabled_extensions: 0_u8,
18743        s: 0_i16,
18744        t: 0_i16,
18745        aux1: 0_i16,
18746        aux2: 0_i16,
18747        aux3: 0_i16,
18748        aux4: 0_i16,
18749        aux5: 0_i16,
18750        aux6: 0_i16,
18751    };
18752    #[cfg(feature = "arbitrary")]
18753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18754        use arbitrary::{Arbitrary, Unstructured};
18755        let mut buf = [0u8; 1024];
18756        rng.fill_bytes(&mut buf);
18757        let mut unstructured = Unstructured::new(&buf);
18758        Self::arbitrary(&mut unstructured).unwrap_or_default()
18759    }
18760}
18761impl Default for MANUAL_CONTROL_DATA {
18762    fn default() -> Self {
18763        Self::DEFAULT.clone()
18764    }
18765}
18766impl MessageData for MANUAL_CONTROL_DATA {
18767    type Message = MavMessage;
18768    const ID: u32 = 69u32;
18769    const NAME: &'static str = "MANUAL_CONTROL";
18770    const EXTRA_CRC: u8 = 243u8;
18771    const ENCODED_LEN: usize = 30usize;
18772    fn deser(
18773        _version: MavlinkVersion,
18774        __input: &[u8],
18775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18776        let avail_len = __input.len();
18777        let mut payload_buf = [0; Self::ENCODED_LEN];
18778        let mut buf = if avail_len < Self::ENCODED_LEN {
18779            payload_buf[0..avail_len].copy_from_slice(__input);
18780            Bytes::new(&payload_buf)
18781        } else {
18782            Bytes::new(__input)
18783        };
18784        let mut __struct = Self::default();
18785        __struct.x = buf.get_i16_le();
18786        __struct.y = buf.get_i16_le();
18787        __struct.z = buf.get_i16_le();
18788        __struct.r = buf.get_i16_le();
18789        __struct.buttons = buf.get_u16_le();
18790        __struct.target = buf.get_u8();
18791        __struct.buttons2 = buf.get_u16_le();
18792        __struct.enabled_extensions = buf.get_u8();
18793        __struct.s = buf.get_i16_le();
18794        __struct.t = buf.get_i16_le();
18795        __struct.aux1 = buf.get_i16_le();
18796        __struct.aux2 = buf.get_i16_le();
18797        __struct.aux3 = buf.get_i16_le();
18798        __struct.aux4 = buf.get_i16_le();
18799        __struct.aux5 = buf.get_i16_le();
18800        __struct.aux6 = buf.get_i16_le();
18801        Ok(__struct)
18802    }
18803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18804        let mut __tmp = BytesMut::new(bytes);
18805        #[allow(clippy::absurd_extreme_comparisons)]
18806        #[allow(unused_comparisons)]
18807        if __tmp.remaining() < Self::ENCODED_LEN {
18808            panic!(
18809                "buffer is too small (need {} bytes, but got {})",
18810                Self::ENCODED_LEN,
18811                __tmp.remaining(),
18812            )
18813        }
18814        __tmp.put_i16_le(self.x);
18815        __tmp.put_i16_le(self.y);
18816        __tmp.put_i16_le(self.z);
18817        __tmp.put_i16_le(self.r);
18818        __tmp.put_u16_le(self.buttons);
18819        __tmp.put_u8(self.target);
18820        if matches!(version, MavlinkVersion::V2) {
18821            __tmp.put_u16_le(self.buttons2);
18822            __tmp.put_u8(self.enabled_extensions);
18823            __tmp.put_i16_le(self.s);
18824            __tmp.put_i16_le(self.t);
18825            __tmp.put_i16_le(self.aux1);
18826            __tmp.put_i16_le(self.aux2);
18827            __tmp.put_i16_le(self.aux3);
18828            __tmp.put_i16_le(self.aux4);
18829            __tmp.put_i16_le(self.aux5);
18830            __tmp.put_i16_le(self.aux6);
18831            let len = __tmp.len();
18832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18833        } else {
18834            __tmp.len()
18835        }
18836    }
18837}
18838#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18839#[doc = ""]
18840#[doc = "ID: 81"]
18841#[derive(Debug, Clone, PartialEq)]
18842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18844#[cfg_attr(feature = "ts", derive(TS))]
18845#[cfg_attr(feature = "ts", ts(export))]
18846pub struct MANUAL_SETPOINT_DATA {
18847    #[doc = "Timestamp (time since system boot)."]
18848    pub time_boot_ms: u32,
18849    #[doc = "Desired roll rate"]
18850    pub roll: f32,
18851    #[doc = "Desired pitch rate"]
18852    pub pitch: f32,
18853    #[doc = "Desired yaw rate"]
18854    pub yaw: f32,
18855    #[doc = "Collective thrust, normalized to 0 .. 1"]
18856    pub thrust: f32,
18857    #[doc = "Flight mode switch position, 0.. 255"]
18858    pub mode_switch: u8,
18859    #[doc = "Override mode switch position, 0.. 255"]
18860    pub manual_override_switch: u8,
18861}
18862impl MANUAL_SETPOINT_DATA {
18863    pub const ENCODED_LEN: usize = 22usize;
18864    pub const DEFAULT: Self = Self {
18865        time_boot_ms: 0_u32,
18866        roll: 0.0_f32,
18867        pitch: 0.0_f32,
18868        yaw: 0.0_f32,
18869        thrust: 0.0_f32,
18870        mode_switch: 0_u8,
18871        manual_override_switch: 0_u8,
18872    };
18873    #[cfg(feature = "arbitrary")]
18874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18875        use arbitrary::{Arbitrary, Unstructured};
18876        let mut buf = [0u8; 1024];
18877        rng.fill_bytes(&mut buf);
18878        let mut unstructured = Unstructured::new(&buf);
18879        Self::arbitrary(&mut unstructured).unwrap_or_default()
18880    }
18881}
18882impl Default for MANUAL_SETPOINT_DATA {
18883    fn default() -> Self {
18884        Self::DEFAULT.clone()
18885    }
18886}
18887impl MessageData for MANUAL_SETPOINT_DATA {
18888    type Message = MavMessage;
18889    const ID: u32 = 81u32;
18890    const NAME: &'static str = "MANUAL_SETPOINT";
18891    const EXTRA_CRC: u8 = 106u8;
18892    const ENCODED_LEN: usize = 22usize;
18893    fn deser(
18894        _version: MavlinkVersion,
18895        __input: &[u8],
18896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18897        let avail_len = __input.len();
18898        let mut payload_buf = [0; Self::ENCODED_LEN];
18899        let mut buf = if avail_len < Self::ENCODED_LEN {
18900            payload_buf[0..avail_len].copy_from_slice(__input);
18901            Bytes::new(&payload_buf)
18902        } else {
18903            Bytes::new(__input)
18904        };
18905        let mut __struct = Self::default();
18906        __struct.time_boot_ms = buf.get_u32_le();
18907        __struct.roll = buf.get_f32_le();
18908        __struct.pitch = buf.get_f32_le();
18909        __struct.yaw = buf.get_f32_le();
18910        __struct.thrust = buf.get_f32_le();
18911        __struct.mode_switch = buf.get_u8();
18912        __struct.manual_override_switch = buf.get_u8();
18913        Ok(__struct)
18914    }
18915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18916        let mut __tmp = BytesMut::new(bytes);
18917        #[allow(clippy::absurd_extreme_comparisons)]
18918        #[allow(unused_comparisons)]
18919        if __tmp.remaining() < Self::ENCODED_LEN {
18920            panic!(
18921                "buffer is too small (need {} bytes, but got {})",
18922                Self::ENCODED_LEN,
18923                __tmp.remaining(),
18924            )
18925        }
18926        __tmp.put_u32_le(self.time_boot_ms);
18927        __tmp.put_f32_le(self.roll);
18928        __tmp.put_f32_le(self.pitch);
18929        __tmp.put_f32_le(self.yaw);
18930        __tmp.put_f32_le(self.thrust);
18931        __tmp.put_u8(self.mode_switch);
18932        __tmp.put_u8(self.manual_override_switch);
18933        if matches!(version, MavlinkVersion::V2) {
18934            let len = __tmp.len();
18935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18936        } else {
18937            __tmp.len()
18938        }
18939    }
18940}
18941#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18942#[doc = ""]
18943#[doc = "ID: 249"]
18944#[derive(Debug, Clone, PartialEq)]
18945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18947#[cfg_attr(feature = "ts", derive(TS))]
18948#[cfg_attr(feature = "ts", ts(export))]
18949pub struct MEMORY_VECT_DATA {
18950    #[doc = "Starting address of the debug variables"]
18951    pub address: u16,
18952    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18953    pub ver: u8,
18954    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18955    pub mavtype: u8,
18956    #[doc = "Memory contents at specified address"]
18957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18958    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18959    pub value: [i8; 32],
18960}
18961impl MEMORY_VECT_DATA {
18962    pub const ENCODED_LEN: usize = 36usize;
18963    pub const DEFAULT: Self = Self {
18964        address: 0_u16,
18965        ver: 0_u8,
18966        mavtype: 0_u8,
18967        value: [0_i8; 32usize],
18968    };
18969    #[cfg(feature = "arbitrary")]
18970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18971        use arbitrary::{Arbitrary, Unstructured};
18972        let mut buf = [0u8; 1024];
18973        rng.fill_bytes(&mut buf);
18974        let mut unstructured = Unstructured::new(&buf);
18975        Self::arbitrary(&mut unstructured).unwrap_or_default()
18976    }
18977}
18978impl Default for MEMORY_VECT_DATA {
18979    fn default() -> Self {
18980        Self::DEFAULT.clone()
18981    }
18982}
18983impl MessageData for MEMORY_VECT_DATA {
18984    type Message = MavMessage;
18985    const ID: u32 = 249u32;
18986    const NAME: &'static str = "MEMORY_VECT";
18987    const EXTRA_CRC: u8 = 204u8;
18988    const ENCODED_LEN: usize = 36usize;
18989    fn deser(
18990        _version: MavlinkVersion,
18991        __input: &[u8],
18992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18993        let avail_len = __input.len();
18994        let mut payload_buf = [0; Self::ENCODED_LEN];
18995        let mut buf = if avail_len < Self::ENCODED_LEN {
18996            payload_buf[0..avail_len].copy_from_slice(__input);
18997            Bytes::new(&payload_buf)
18998        } else {
18999            Bytes::new(__input)
19000        };
19001        let mut __struct = Self::default();
19002        __struct.address = buf.get_u16_le();
19003        __struct.ver = buf.get_u8();
19004        __struct.mavtype = buf.get_u8();
19005        for v in &mut __struct.value {
19006            let val = buf.get_i8();
19007            *v = val;
19008        }
19009        Ok(__struct)
19010    }
19011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19012        let mut __tmp = BytesMut::new(bytes);
19013        #[allow(clippy::absurd_extreme_comparisons)]
19014        #[allow(unused_comparisons)]
19015        if __tmp.remaining() < Self::ENCODED_LEN {
19016            panic!(
19017                "buffer is too small (need {} bytes, but got {})",
19018                Self::ENCODED_LEN,
19019                __tmp.remaining(),
19020            )
19021        }
19022        __tmp.put_u16_le(self.address);
19023        __tmp.put_u8(self.ver);
19024        __tmp.put_u8(self.mavtype);
19025        for val in &self.value {
19026            __tmp.put_i8(*val);
19027        }
19028        if matches!(version, MavlinkVersion::V2) {
19029            let len = __tmp.len();
19030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19031        } else {
19032            __tmp.len()
19033        }
19034    }
19035}
19036#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19037#[doc = ""]
19038#[doc = "ID: 244"]
19039#[derive(Debug, Clone, PartialEq)]
19040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19042#[cfg_attr(feature = "ts", derive(TS))]
19043#[cfg_attr(feature = "ts", ts(export))]
19044pub struct MESSAGE_INTERVAL_DATA {
19045    #[doc = "0 indicates the interval at which it is sent."]
19046    pub interval_us: i32,
19047    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19048    pub message_id: u16,
19049}
19050impl MESSAGE_INTERVAL_DATA {
19051    pub const ENCODED_LEN: usize = 6usize;
19052    pub const DEFAULT: Self = Self {
19053        interval_us: 0_i32,
19054        message_id: 0_u16,
19055    };
19056    #[cfg(feature = "arbitrary")]
19057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19058        use arbitrary::{Arbitrary, Unstructured};
19059        let mut buf = [0u8; 1024];
19060        rng.fill_bytes(&mut buf);
19061        let mut unstructured = Unstructured::new(&buf);
19062        Self::arbitrary(&mut unstructured).unwrap_or_default()
19063    }
19064}
19065impl Default for MESSAGE_INTERVAL_DATA {
19066    fn default() -> Self {
19067        Self::DEFAULT.clone()
19068    }
19069}
19070impl MessageData for MESSAGE_INTERVAL_DATA {
19071    type Message = MavMessage;
19072    const ID: u32 = 244u32;
19073    const NAME: &'static str = "MESSAGE_INTERVAL";
19074    const EXTRA_CRC: u8 = 95u8;
19075    const ENCODED_LEN: usize = 6usize;
19076    fn deser(
19077        _version: MavlinkVersion,
19078        __input: &[u8],
19079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19080        let avail_len = __input.len();
19081        let mut payload_buf = [0; Self::ENCODED_LEN];
19082        let mut buf = if avail_len < Self::ENCODED_LEN {
19083            payload_buf[0..avail_len].copy_from_slice(__input);
19084            Bytes::new(&payload_buf)
19085        } else {
19086            Bytes::new(__input)
19087        };
19088        let mut __struct = Self::default();
19089        __struct.interval_us = buf.get_i32_le();
19090        __struct.message_id = buf.get_u16_le();
19091        Ok(__struct)
19092    }
19093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19094        let mut __tmp = BytesMut::new(bytes);
19095        #[allow(clippy::absurd_extreme_comparisons)]
19096        #[allow(unused_comparisons)]
19097        if __tmp.remaining() < Self::ENCODED_LEN {
19098            panic!(
19099                "buffer is too small (need {} bytes, but got {})",
19100                Self::ENCODED_LEN,
19101                __tmp.remaining(),
19102            )
19103        }
19104        __tmp.put_i32_le(self.interval_us);
19105        __tmp.put_u16_le(self.message_id);
19106        if matches!(version, MavlinkVersion::V2) {
19107            let len = __tmp.len();
19108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19109        } else {
19110            __tmp.len()
19111        }
19112    }
19113}
19114#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19115#[doc = ""]
19116#[doc = "ID: 47"]
19117#[derive(Debug, Clone, PartialEq)]
19118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19120#[cfg_attr(feature = "ts", derive(TS))]
19121#[cfg_attr(feature = "ts", ts(export))]
19122pub struct MISSION_ACK_DATA {
19123    #[doc = "System ID"]
19124    pub target_system: u8,
19125    #[doc = "Component ID"]
19126    pub target_component: u8,
19127    #[doc = "Mission result."]
19128    pub mavtype: MavMissionResult,
19129    #[doc = "Mission type."]
19130    #[cfg_attr(feature = "serde", serde(default))]
19131    pub mission_type: MavMissionType,
19132    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19133    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19134    pub opaque_id: u32,
19135}
19136impl MISSION_ACK_DATA {
19137    pub const ENCODED_LEN: usize = 8usize;
19138    pub const DEFAULT: Self = Self {
19139        target_system: 0_u8,
19140        target_component: 0_u8,
19141        mavtype: MavMissionResult::DEFAULT,
19142        mission_type: MavMissionType::DEFAULT,
19143        opaque_id: 0_u32,
19144    };
19145    #[cfg(feature = "arbitrary")]
19146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19147        use arbitrary::{Arbitrary, Unstructured};
19148        let mut buf = [0u8; 1024];
19149        rng.fill_bytes(&mut buf);
19150        let mut unstructured = Unstructured::new(&buf);
19151        Self::arbitrary(&mut unstructured).unwrap_or_default()
19152    }
19153}
19154impl Default for MISSION_ACK_DATA {
19155    fn default() -> Self {
19156        Self::DEFAULT.clone()
19157    }
19158}
19159impl MessageData for MISSION_ACK_DATA {
19160    type Message = MavMessage;
19161    const ID: u32 = 47u32;
19162    const NAME: &'static str = "MISSION_ACK";
19163    const EXTRA_CRC: u8 = 153u8;
19164    const ENCODED_LEN: usize = 8usize;
19165    fn deser(
19166        _version: MavlinkVersion,
19167        __input: &[u8],
19168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19169        let avail_len = __input.len();
19170        let mut payload_buf = [0; Self::ENCODED_LEN];
19171        let mut buf = if avail_len < Self::ENCODED_LEN {
19172            payload_buf[0..avail_len].copy_from_slice(__input);
19173            Bytes::new(&payload_buf)
19174        } else {
19175            Bytes::new(__input)
19176        };
19177        let mut __struct = Self::default();
19178        __struct.target_system = buf.get_u8();
19179        __struct.target_component = buf.get_u8();
19180        let tmp = buf.get_u8();
19181        __struct.mavtype =
19182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19183                enum_type: "MavMissionResult",
19184                value: tmp as u64,
19185            })?;
19186        let tmp = buf.get_u8();
19187        __struct.mission_type =
19188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19189                enum_type: "MavMissionType",
19190                value: tmp as u64,
19191            })?;
19192        __struct.opaque_id = buf.get_u32_le();
19193        Ok(__struct)
19194    }
19195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19196        let mut __tmp = BytesMut::new(bytes);
19197        #[allow(clippy::absurd_extreme_comparisons)]
19198        #[allow(unused_comparisons)]
19199        if __tmp.remaining() < Self::ENCODED_LEN {
19200            panic!(
19201                "buffer is too small (need {} bytes, but got {})",
19202                Self::ENCODED_LEN,
19203                __tmp.remaining(),
19204            )
19205        }
19206        __tmp.put_u8(self.target_system);
19207        __tmp.put_u8(self.target_component);
19208        __tmp.put_u8(self.mavtype as u8);
19209        if matches!(version, MavlinkVersion::V2) {
19210            __tmp.put_u8(self.mission_type as u8);
19211            __tmp.put_u32_le(self.opaque_id);
19212            let len = __tmp.len();
19213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19214        } else {
19215            __tmp.len()
19216        }
19217    }
19218}
19219#[doc = "Delete all mission items at once."]
19220#[doc = ""]
19221#[doc = "ID: 45"]
19222#[derive(Debug, Clone, PartialEq)]
19223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19225#[cfg_attr(feature = "ts", derive(TS))]
19226#[cfg_attr(feature = "ts", ts(export))]
19227pub struct MISSION_CLEAR_ALL_DATA {
19228    #[doc = "System ID"]
19229    pub target_system: u8,
19230    #[doc = "Component ID"]
19231    pub target_component: u8,
19232    #[doc = "Mission type."]
19233    #[cfg_attr(feature = "serde", serde(default))]
19234    pub mission_type: MavMissionType,
19235}
19236impl MISSION_CLEAR_ALL_DATA {
19237    pub const ENCODED_LEN: usize = 3usize;
19238    pub const DEFAULT: Self = Self {
19239        target_system: 0_u8,
19240        target_component: 0_u8,
19241        mission_type: MavMissionType::DEFAULT,
19242    };
19243    #[cfg(feature = "arbitrary")]
19244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19245        use arbitrary::{Arbitrary, Unstructured};
19246        let mut buf = [0u8; 1024];
19247        rng.fill_bytes(&mut buf);
19248        let mut unstructured = Unstructured::new(&buf);
19249        Self::arbitrary(&mut unstructured).unwrap_or_default()
19250    }
19251}
19252impl Default for MISSION_CLEAR_ALL_DATA {
19253    fn default() -> Self {
19254        Self::DEFAULT.clone()
19255    }
19256}
19257impl MessageData for MISSION_CLEAR_ALL_DATA {
19258    type Message = MavMessage;
19259    const ID: u32 = 45u32;
19260    const NAME: &'static str = "MISSION_CLEAR_ALL";
19261    const EXTRA_CRC: u8 = 232u8;
19262    const ENCODED_LEN: usize = 3usize;
19263    fn deser(
19264        _version: MavlinkVersion,
19265        __input: &[u8],
19266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19267        let avail_len = __input.len();
19268        let mut payload_buf = [0; Self::ENCODED_LEN];
19269        let mut buf = if avail_len < Self::ENCODED_LEN {
19270            payload_buf[0..avail_len].copy_from_slice(__input);
19271            Bytes::new(&payload_buf)
19272        } else {
19273            Bytes::new(__input)
19274        };
19275        let mut __struct = Self::default();
19276        __struct.target_system = buf.get_u8();
19277        __struct.target_component = buf.get_u8();
19278        let tmp = buf.get_u8();
19279        __struct.mission_type =
19280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19281                enum_type: "MavMissionType",
19282                value: tmp as u64,
19283            })?;
19284        Ok(__struct)
19285    }
19286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19287        let mut __tmp = BytesMut::new(bytes);
19288        #[allow(clippy::absurd_extreme_comparisons)]
19289        #[allow(unused_comparisons)]
19290        if __tmp.remaining() < Self::ENCODED_LEN {
19291            panic!(
19292                "buffer is too small (need {} bytes, but got {})",
19293                Self::ENCODED_LEN,
19294                __tmp.remaining(),
19295            )
19296        }
19297        __tmp.put_u8(self.target_system);
19298        __tmp.put_u8(self.target_component);
19299        if matches!(version, MavlinkVersion::V2) {
19300            __tmp.put_u8(self.mission_type as u8);
19301            let len = __tmp.len();
19302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19303        } else {
19304            __tmp.len()
19305        }
19306    }
19307}
19308#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19309#[doc = ""]
19310#[doc = "ID: 44"]
19311#[derive(Debug, Clone, PartialEq)]
19312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19314#[cfg_attr(feature = "ts", derive(TS))]
19315#[cfg_attr(feature = "ts", ts(export))]
19316pub struct MISSION_COUNT_DATA {
19317    #[doc = "Number of mission items in the sequence"]
19318    pub count: u16,
19319    #[doc = "System ID"]
19320    pub target_system: u8,
19321    #[doc = "Component ID"]
19322    pub target_component: u8,
19323    #[doc = "Mission type."]
19324    #[cfg_attr(feature = "serde", serde(default))]
19325    pub mission_type: MavMissionType,
19326    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19328    pub opaque_id: u32,
19329}
19330impl MISSION_COUNT_DATA {
19331    pub const ENCODED_LEN: usize = 9usize;
19332    pub const DEFAULT: Self = Self {
19333        count: 0_u16,
19334        target_system: 0_u8,
19335        target_component: 0_u8,
19336        mission_type: MavMissionType::DEFAULT,
19337        opaque_id: 0_u32,
19338    };
19339    #[cfg(feature = "arbitrary")]
19340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19341        use arbitrary::{Arbitrary, Unstructured};
19342        let mut buf = [0u8; 1024];
19343        rng.fill_bytes(&mut buf);
19344        let mut unstructured = Unstructured::new(&buf);
19345        Self::arbitrary(&mut unstructured).unwrap_or_default()
19346    }
19347}
19348impl Default for MISSION_COUNT_DATA {
19349    fn default() -> Self {
19350        Self::DEFAULT.clone()
19351    }
19352}
19353impl MessageData for MISSION_COUNT_DATA {
19354    type Message = MavMessage;
19355    const ID: u32 = 44u32;
19356    const NAME: &'static str = "MISSION_COUNT";
19357    const EXTRA_CRC: u8 = 221u8;
19358    const ENCODED_LEN: usize = 9usize;
19359    fn deser(
19360        _version: MavlinkVersion,
19361        __input: &[u8],
19362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19363        let avail_len = __input.len();
19364        let mut payload_buf = [0; Self::ENCODED_LEN];
19365        let mut buf = if avail_len < Self::ENCODED_LEN {
19366            payload_buf[0..avail_len].copy_from_slice(__input);
19367            Bytes::new(&payload_buf)
19368        } else {
19369            Bytes::new(__input)
19370        };
19371        let mut __struct = Self::default();
19372        __struct.count = buf.get_u16_le();
19373        __struct.target_system = buf.get_u8();
19374        __struct.target_component = buf.get_u8();
19375        let tmp = buf.get_u8();
19376        __struct.mission_type =
19377            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19378                enum_type: "MavMissionType",
19379                value: tmp as u64,
19380            })?;
19381        __struct.opaque_id = buf.get_u32_le();
19382        Ok(__struct)
19383    }
19384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19385        let mut __tmp = BytesMut::new(bytes);
19386        #[allow(clippy::absurd_extreme_comparisons)]
19387        #[allow(unused_comparisons)]
19388        if __tmp.remaining() < Self::ENCODED_LEN {
19389            panic!(
19390                "buffer is too small (need {} bytes, but got {})",
19391                Self::ENCODED_LEN,
19392                __tmp.remaining(),
19393            )
19394        }
19395        __tmp.put_u16_le(self.count);
19396        __tmp.put_u8(self.target_system);
19397        __tmp.put_u8(self.target_component);
19398        if matches!(version, MavlinkVersion::V2) {
19399            __tmp.put_u8(self.mission_type as u8);
19400            __tmp.put_u32_le(self.opaque_id);
19401            let len = __tmp.len();
19402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19403        } else {
19404            __tmp.len()
19405        }
19406    }
19407}
19408#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19409#[doc = ""]
19410#[doc = "ID: 42"]
19411#[derive(Debug, Clone, PartialEq)]
19412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19414#[cfg_attr(feature = "ts", derive(TS))]
19415#[cfg_attr(feature = "ts", ts(export))]
19416pub struct MISSION_CURRENT_DATA {
19417    #[doc = "Sequence"]
19418    pub seq: u16,
19419    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19420    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19421    pub total: u16,
19422    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19423    #[cfg_attr(feature = "serde", serde(default))]
19424    pub mission_state: MissionState,
19425    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19427    pub mission_mode: u8,
19428    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19430    pub mission_id: u32,
19431    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19433    pub fence_id: u32,
19434    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19436    pub rally_points_id: u32,
19437}
19438impl MISSION_CURRENT_DATA {
19439    pub const ENCODED_LEN: usize = 18usize;
19440    pub const DEFAULT: Self = Self {
19441        seq: 0_u16,
19442        total: 0_u16,
19443        mission_state: MissionState::DEFAULT,
19444        mission_mode: 0_u8,
19445        mission_id: 0_u32,
19446        fence_id: 0_u32,
19447        rally_points_id: 0_u32,
19448    };
19449    #[cfg(feature = "arbitrary")]
19450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19451        use arbitrary::{Arbitrary, Unstructured};
19452        let mut buf = [0u8; 1024];
19453        rng.fill_bytes(&mut buf);
19454        let mut unstructured = Unstructured::new(&buf);
19455        Self::arbitrary(&mut unstructured).unwrap_or_default()
19456    }
19457}
19458impl Default for MISSION_CURRENT_DATA {
19459    fn default() -> Self {
19460        Self::DEFAULT.clone()
19461    }
19462}
19463impl MessageData for MISSION_CURRENT_DATA {
19464    type Message = MavMessage;
19465    const ID: u32 = 42u32;
19466    const NAME: &'static str = "MISSION_CURRENT";
19467    const EXTRA_CRC: u8 = 28u8;
19468    const ENCODED_LEN: usize = 18usize;
19469    fn deser(
19470        _version: MavlinkVersion,
19471        __input: &[u8],
19472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19473        let avail_len = __input.len();
19474        let mut payload_buf = [0; Self::ENCODED_LEN];
19475        let mut buf = if avail_len < Self::ENCODED_LEN {
19476            payload_buf[0..avail_len].copy_from_slice(__input);
19477            Bytes::new(&payload_buf)
19478        } else {
19479            Bytes::new(__input)
19480        };
19481        let mut __struct = Self::default();
19482        __struct.seq = buf.get_u16_le();
19483        __struct.total = buf.get_u16_le();
19484        let tmp = buf.get_u8();
19485        __struct.mission_state =
19486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19487                enum_type: "MissionState",
19488                value: tmp as u64,
19489            })?;
19490        __struct.mission_mode = buf.get_u8();
19491        __struct.mission_id = buf.get_u32_le();
19492        __struct.fence_id = buf.get_u32_le();
19493        __struct.rally_points_id = buf.get_u32_le();
19494        Ok(__struct)
19495    }
19496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19497        let mut __tmp = BytesMut::new(bytes);
19498        #[allow(clippy::absurd_extreme_comparisons)]
19499        #[allow(unused_comparisons)]
19500        if __tmp.remaining() < Self::ENCODED_LEN {
19501            panic!(
19502                "buffer is too small (need {} bytes, but got {})",
19503                Self::ENCODED_LEN,
19504                __tmp.remaining(),
19505            )
19506        }
19507        __tmp.put_u16_le(self.seq);
19508        if matches!(version, MavlinkVersion::V2) {
19509            __tmp.put_u16_le(self.total);
19510            __tmp.put_u8(self.mission_state as u8);
19511            __tmp.put_u8(self.mission_mode);
19512            __tmp.put_u32_le(self.mission_id);
19513            __tmp.put_u32_le(self.fence_id);
19514            __tmp.put_u32_le(self.rally_points_id);
19515            let len = __tmp.len();
19516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19517        } else {
19518            __tmp.len()
19519        }
19520    }
19521}
19522#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19523#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19524#[doc = ""]
19525#[doc = "ID: 39"]
19526#[derive(Debug, Clone, PartialEq)]
19527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19529#[cfg_attr(feature = "ts", derive(TS))]
19530#[cfg_attr(feature = "ts", ts(export))]
19531pub struct MISSION_ITEM_DATA {
19532    #[doc = "PARAM1, see MAV_CMD enum"]
19533    pub param1: f32,
19534    #[doc = "PARAM2, see MAV_CMD enum"]
19535    pub param2: f32,
19536    #[doc = "PARAM3, see MAV_CMD enum"]
19537    pub param3: f32,
19538    #[doc = "PARAM4, see MAV_CMD enum"]
19539    pub param4: f32,
19540    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19541    pub x: f32,
19542    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19543    pub y: f32,
19544    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19545    pub z: f32,
19546    #[doc = "Sequence"]
19547    pub seq: u16,
19548    #[doc = "The scheduled action for the waypoint."]
19549    pub command: MavCmd,
19550    #[doc = "System ID"]
19551    pub target_system: u8,
19552    #[doc = "Component ID"]
19553    pub target_component: u8,
19554    #[doc = "The coordinate system of the waypoint."]
19555    pub frame: MavFrame,
19556    #[doc = "false:0, true:1"]
19557    pub current: u8,
19558    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19559    pub autocontinue: u8,
19560    #[doc = "Mission type."]
19561    #[cfg_attr(feature = "serde", serde(default))]
19562    pub mission_type: MavMissionType,
19563}
19564impl MISSION_ITEM_DATA {
19565    pub const ENCODED_LEN: usize = 38usize;
19566    pub const DEFAULT: Self = Self {
19567        param1: 0.0_f32,
19568        param2: 0.0_f32,
19569        param3: 0.0_f32,
19570        param4: 0.0_f32,
19571        x: 0.0_f32,
19572        y: 0.0_f32,
19573        z: 0.0_f32,
19574        seq: 0_u16,
19575        command: MavCmd::DEFAULT,
19576        target_system: 0_u8,
19577        target_component: 0_u8,
19578        frame: MavFrame::DEFAULT,
19579        current: 0_u8,
19580        autocontinue: 0_u8,
19581        mission_type: MavMissionType::DEFAULT,
19582    };
19583    #[cfg(feature = "arbitrary")]
19584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19585        use arbitrary::{Arbitrary, Unstructured};
19586        let mut buf = [0u8; 1024];
19587        rng.fill_bytes(&mut buf);
19588        let mut unstructured = Unstructured::new(&buf);
19589        Self::arbitrary(&mut unstructured).unwrap_or_default()
19590    }
19591}
19592impl Default for MISSION_ITEM_DATA {
19593    fn default() -> Self {
19594        Self::DEFAULT.clone()
19595    }
19596}
19597impl MessageData for MISSION_ITEM_DATA {
19598    type Message = MavMessage;
19599    const ID: u32 = 39u32;
19600    const NAME: &'static str = "MISSION_ITEM";
19601    const EXTRA_CRC: u8 = 254u8;
19602    const ENCODED_LEN: usize = 38usize;
19603    fn deser(
19604        _version: MavlinkVersion,
19605        __input: &[u8],
19606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19607        let avail_len = __input.len();
19608        let mut payload_buf = [0; Self::ENCODED_LEN];
19609        let mut buf = if avail_len < Self::ENCODED_LEN {
19610            payload_buf[0..avail_len].copy_from_slice(__input);
19611            Bytes::new(&payload_buf)
19612        } else {
19613            Bytes::new(__input)
19614        };
19615        let mut __struct = Self::default();
19616        __struct.param1 = buf.get_f32_le();
19617        __struct.param2 = buf.get_f32_le();
19618        __struct.param3 = buf.get_f32_le();
19619        __struct.param4 = buf.get_f32_le();
19620        __struct.x = buf.get_f32_le();
19621        __struct.y = buf.get_f32_le();
19622        __struct.z = buf.get_f32_le();
19623        __struct.seq = buf.get_u16_le();
19624        let tmp = buf.get_u16_le();
19625        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19626            ::mavlink_core::error::ParserError::InvalidEnum {
19627                enum_type: "MavCmd",
19628                value: tmp as u64,
19629            },
19630        )?;
19631        __struct.target_system = buf.get_u8();
19632        __struct.target_component = buf.get_u8();
19633        let tmp = buf.get_u8();
19634        __struct.frame =
19635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19636                enum_type: "MavFrame",
19637                value: tmp as u64,
19638            })?;
19639        __struct.current = buf.get_u8();
19640        __struct.autocontinue = buf.get_u8();
19641        let tmp = buf.get_u8();
19642        __struct.mission_type =
19643            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19644                enum_type: "MavMissionType",
19645                value: tmp as u64,
19646            })?;
19647        Ok(__struct)
19648    }
19649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19650        let mut __tmp = BytesMut::new(bytes);
19651        #[allow(clippy::absurd_extreme_comparisons)]
19652        #[allow(unused_comparisons)]
19653        if __tmp.remaining() < Self::ENCODED_LEN {
19654            panic!(
19655                "buffer is too small (need {} bytes, but got {})",
19656                Self::ENCODED_LEN,
19657                __tmp.remaining(),
19658            )
19659        }
19660        __tmp.put_f32_le(self.param1);
19661        __tmp.put_f32_le(self.param2);
19662        __tmp.put_f32_le(self.param3);
19663        __tmp.put_f32_le(self.param4);
19664        __tmp.put_f32_le(self.x);
19665        __tmp.put_f32_le(self.y);
19666        __tmp.put_f32_le(self.z);
19667        __tmp.put_u16_le(self.seq);
19668        __tmp.put_u16_le(self.command as u16);
19669        __tmp.put_u8(self.target_system);
19670        __tmp.put_u8(self.target_component);
19671        __tmp.put_u8(self.frame as u8);
19672        __tmp.put_u8(self.current);
19673        __tmp.put_u8(self.autocontinue);
19674        if matches!(version, MavlinkVersion::V2) {
19675            __tmp.put_u8(self.mission_type as u8);
19676            let len = __tmp.len();
19677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19678        } else {
19679            __tmp.len()
19680        }
19681    }
19682}
19683#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19684#[doc = ""]
19685#[doc = "ID: 73"]
19686#[derive(Debug, Clone, PartialEq)]
19687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19689#[cfg_attr(feature = "ts", derive(TS))]
19690#[cfg_attr(feature = "ts", ts(export))]
19691pub struct MISSION_ITEM_INT_DATA {
19692    #[doc = "PARAM1, see MAV_CMD enum"]
19693    pub param1: f32,
19694    #[doc = "PARAM2, see MAV_CMD enum"]
19695    pub param2: f32,
19696    #[doc = "PARAM3, see MAV_CMD enum"]
19697    pub param3: f32,
19698    #[doc = "PARAM4, see MAV_CMD enum"]
19699    pub param4: f32,
19700    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19701    pub x: i32,
19702    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19703    pub y: i32,
19704    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19705    pub z: f32,
19706    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19707    pub seq: u16,
19708    #[doc = "The scheduled action for the waypoint."]
19709    pub command: MavCmd,
19710    #[doc = "System ID"]
19711    pub target_system: u8,
19712    #[doc = "Component ID"]
19713    pub target_component: u8,
19714    #[doc = "The coordinate system of the waypoint."]
19715    pub frame: MavFrame,
19716    #[doc = "false:0, true:1"]
19717    pub current: u8,
19718    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19719    pub autocontinue: u8,
19720    #[doc = "Mission type."]
19721    #[cfg_attr(feature = "serde", serde(default))]
19722    pub mission_type: MavMissionType,
19723}
19724impl MISSION_ITEM_INT_DATA {
19725    pub const ENCODED_LEN: usize = 38usize;
19726    pub const DEFAULT: Self = Self {
19727        param1: 0.0_f32,
19728        param2: 0.0_f32,
19729        param3: 0.0_f32,
19730        param4: 0.0_f32,
19731        x: 0_i32,
19732        y: 0_i32,
19733        z: 0.0_f32,
19734        seq: 0_u16,
19735        command: MavCmd::DEFAULT,
19736        target_system: 0_u8,
19737        target_component: 0_u8,
19738        frame: MavFrame::DEFAULT,
19739        current: 0_u8,
19740        autocontinue: 0_u8,
19741        mission_type: MavMissionType::DEFAULT,
19742    };
19743    #[cfg(feature = "arbitrary")]
19744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19745        use arbitrary::{Arbitrary, Unstructured};
19746        let mut buf = [0u8; 1024];
19747        rng.fill_bytes(&mut buf);
19748        let mut unstructured = Unstructured::new(&buf);
19749        Self::arbitrary(&mut unstructured).unwrap_or_default()
19750    }
19751}
19752impl Default for MISSION_ITEM_INT_DATA {
19753    fn default() -> Self {
19754        Self::DEFAULT.clone()
19755    }
19756}
19757impl MessageData for MISSION_ITEM_INT_DATA {
19758    type Message = MavMessage;
19759    const ID: u32 = 73u32;
19760    const NAME: &'static str = "MISSION_ITEM_INT";
19761    const EXTRA_CRC: u8 = 38u8;
19762    const ENCODED_LEN: usize = 38usize;
19763    fn deser(
19764        _version: MavlinkVersion,
19765        __input: &[u8],
19766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19767        let avail_len = __input.len();
19768        let mut payload_buf = [0; Self::ENCODED_LEN];
19769        let mut buf = if avail_len < Self::ENCODED_LEN {
19770            payload_buf[0..avail_len].copy_from_slice(__input);
19771            Bytes::new(&payload_buf)
19772        } else {
19773            Bytes::new(__input)
19774        };
19775        let mut __struct = Self::default();
19776        __struct.param1 = buf.get_f32_le();
19777        __struct.param2 = buf.get_f32_le();
19778        __struct.param3 = buf.get_f32_le();
19779        __struct.param4 = buf.get_f32_le();
19780        __struct.x = buf.get_i32_le();
19781        __struct.y = buf.get_i32_le();
19782        __struct.z = buf.get_f32_le();
19783        __struct.seq = buf.get_u16_le();
19784        let tmp = buf.get_u16_le();
19785        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19786            ::mavlink_core::error::ParserError::InvalidEnum {
19787                enum_type: "MavCmd",
19788                value: tmp as u64,
19789            },
19790        )?;
19791        __struct.target_system = buf.get_u8();
19792        __struct.target_component = buf.get_u8();
19793        let tmp = buf.get_u8();
19794        __struct.frame =
19795            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19796                enum_type: "MavFrame",
19797                value: tmp as u64,
19798            })?;
19799        __struct.current = buf.get_u8();
19800        __struct.autocontinue = buf.get_u8();
19801        let tmp = buf.get_u8();
19802        __struct.mission_type =
19803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19804                enum_type: "MavMissionType",
19805                value: tmp as u64,
19806            })?;
19807        Ok(__struct)
19808    }
19809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19810        let mut __tmp = BytesMut::new(bytes);
19811        #[allow(clippy::absurd_extreme_comparisons)]
19812        #[allow(unused_comparisons)]
19813        if __tmp.remaining() < Self::ENCODED_LEN {
19814            panic!(
19815                "buffer is too small (need {} bytes, but got {})",
19816                Self::ENCODED_LEN,
19817                __tmp.remaining(),
19818            )
19819        }
19820        __tmp.put_f32_le(self.param1);
19821        __tmp.put_f32_le(self.param2);
19822        __tmp.put_f32_le(self.param3);
19823        __tmp.put_f32_le(self.param4);
19824        __tmp.put_i32_le(self.x);
19825        __tmp.put_i32_le(self.y);
19826        __tmp.put_f32_le(self.z);
19827        __tmp.put_u16_le(self.seq);
19828        __tmp.put_u16_le(self.command as u16);
19829        __tmp.put_u8(self.target_system);
19830        __tmp.put_u8(self.target_component);
19831        __tmp.put_u8(self.frame as u8);
19832        __tmp.put_u8(self.current);
19833        __tmp.put_u8(self.autocontinue);
19834        if matches!(version, MavlinkVersion::V2) {
19835            __tmp.put_u8(self.mission_type as u8);
19836            let len = __tmp.len();
19837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19838        } else {
19839            __tmp.len()
19840        }
19841    }
19842}
19843#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19844#[doc = ""]
19845#[doc = "ID: 46"]
19846#[derive(Debug, Clone, PartialEq)]
19847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19849#[cfg_attr(feature = "ts", derive(TS))]
19850#[cfg_attr(feature = "ts", ts(export))]
19851pub struct MISSION_ITEM_REACHED_DATA {
19852    #[doc = "Sequence"]
19853    pub seq: u16,
19854}
19855impl MISSION_ITEM_REACHED_DATA {
19856    pub const ENCODED_LEN: usize = 2usize;
19857    pub const DEFAULT: Self = Self { seq: 0_u16 };
19858    #[cfg(feature = "arbitrary")]
19859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19860        use arbitrary::{Arbitrary, Unstructured};
19861        let mut buf = [0u8; 1024];
19862        rng.fill_bytes(&mut buf);
19863        let mut unstructured = Unstructured::new(&buf);
19864        Self::arbitrary(&mut unstructured).unwrap_or_default()
19865    }
19866}
19867impl Default for MISSION_ITEM_REACHED_DATA {
19868    fn default() -> Self {
19869        Self::DEFAULT.clone()
19870    }
19871}
19872impl MessageData for MISSION_ITEM_REACHED_DATA {
19873    type Message = MavMessage;
19874    const ID: u32 = 46u32;
19875    const NAME: &'static str = "MISSION_ITEM_REACHED";
19876    const EXTRA_CRC: u8 = 11u8;
19877    const ENCODED_LEN: usize = 2usize;
19878    fn deser(
19879        _version: MavlinkVersion,
19880        __input: &[u8],
19881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19882        let avail_len = __input.len();
19883        let mut payload_buf = [0; Self::ENCODED_LEN];
19884        let mut buf = if avail_len < Self::ENCODED_LEN {
19885            payload_buf[0..avail_len].copy_from_slice(__input);
19886            Bytes::new(&payload_buf)
19887        } else {
19888            Bytes::new(__input)
19889        };
19890        let mut __struct = Self::default();
19891        __struct.seq = buf.get_u16_le();
19892        Ok(__struct)
19893    }
19894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19895        let mut __tmp = BytesMut::new(bytes);
19896        #[allow(clippy::absurd_extreme_comparisons)]
19897        #[allow(unused_comparisons)]
19898        if __tmp.remaining() < Self::ENCODED_LEN {
19899            panic!(
19900                "buffer is too small (need {} bytes, but got {})",
19901                Self::ENCODED_LEN,
19902                __tmp.remaining(),
19903            )
19904        }
19905        __tmp.put_u16_le(self.seq);
19906        if matches!(version, MavlinkVersion::V2) {
19907            let len = __tmp.len();
19908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19909        } else {
19910            __tmp.len()
19911        }
19912    }
19913}
19914#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19915#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19916#[doc = ""]
19917#[doc = "ID: 40"]
19918#[derive(Debug, Clone, PartialEq)]
19919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19921#[cfg_attr(feature = "ts", derive(TS))]
19922#[cfg_attr(feature = "ts", ts(export))]
19923pub struct MISSION_REQUEST_DATA {
19924    #[doc = "Sequence"]
19925    pub seq: u16,
19926    #[doc = "System ID"]
19927    pub target_system: u8,
19928    #[doc = "Component ID"]
19929    pub target_component: u8,
19930    #[doc = "Mission type."]
19931    #[cfg_attr(feature = "serde", serde(default))]
19932    pub mission_type: MavMissionType,
19933}
19934impl MISSION_REQUEST_DATA {
19935    pub const ENCODED_LEN: usize = 5usize;
19936    pub const DEFAULT: Self = Self {
19937        seq: 0_u16,
19938        target_system: 0_u8,
19939        target_component: 0_u8,
19940        mission_type: MavMissionType::DEFAULT,
19941    };
19942    #[cfg(feature = "arbitrary")]
19943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19944        use arbitrary::{Arbitrary, Unstructured};
19945        let mut buf = [0u8; 1024];
19946        rng.fill_bytes(&mut buf);
19947        let mut unstructured = Unstructured::new(&buf);
19948        Self::arbitrary(&mut unstructured).unwrap_or_default()
19949    }
19950}
19951impl Default for MISSION_REQUEST_DATA {
19952    fn default() -> Self {
19953        Self::DEFAULT.clone()
19954    }
19955}
19956impl MessageData for MISSION_REQUEST_DATA {
19957    type Message = MavMessage;
19958    const ID: u32 = 40u32;
19959    const NAME: &'static str = "MISSION_REQUEST";
19960    const EXTRA_CRC: u8 = 230u8;
19961    const ENCODED_LEN: usize = 5usize;
19962    fn deser(
19963        _version: MavlinkVersion,
19964        __input: &[u8],
19965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19966        let avail_len = __input.len();
19967        let mut payload_buf = [0; Self::ENCODED_LEN];
19968        let mut buf = if avail_len < Self::ENCODED_LEN {
19969            payload_buf[0..avail_len].copy_from_slice(__input);
19970            Bytes::new(&payload_buf)
19971        } else {
19972            Bytes::new(__input)
19973        };
19974        let mut __struct = Self::default();
19975        __struct.seq = buf.get_u16_le();
19976        __struct.target_system = buf.get_u8();
19977        __struct.target_component = buf.get_u8();
19978        let tmp = buf.get_u8();
19979        __struct.mission_type =
19980            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19981                enum_type: "MavMissionType",
19982                value: tmp as u64,
19983            })?;
19984        Ok(__struct)
19985    }
19986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19987        let mut __tmp = BytesMut::new(bytes);
19988        #[allow(clippy::absurd_extreme_comparisons)]
19989        #[allow(unused_comparisons)]
19990        if __tmp.remaining() < Self::ENCODED_LEN {
19991            panic!(
19992                "buffer is too small (need {} bytes, but got {})",
19993                Self::ENCODED_LEN,
19994                __tmp.remaining(),
19995            )
19996        }
19997        __tmp.put_u16_le(self.seq);
19998        __tmp.put_u8(self.target_system);
19999        __tmp.put_u8(self.target_component);
20000        if matches!(version, MavlinkVersion::V2) {
20001            __tmp.put_u8(self.mission_type as u8);
20002            let len = __tmp.len();
20003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20004        } else {
20005            __tmp.len()
20006        }
20007    }
20008}
20009#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20010#[doc = ""]
20011#[doc = "ID: 51"]
20012#[derive(Debug, Clone, PartialEq)]
20013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20015#[cfg_attr(feature = "ts", derive(TS))]
20016#[cfg_attr(feature = "ts", ts(export))]
20017pub struct MISSION_REQUEST_INT_DATA {
20018    #[doc = "Sequence"]
20019    pub seq: u16,
20020    #[doc = "System ID"]
20021    pub target_system: u8,
20022    #[doc = "Component ID"]
20023    pub target_component: u8,
20024    #[doc = "Mission type."]
20025    #[cfg_attr(feature = "serde", serde(default))]
20026    pub mission_type: MavMissionType,
20027}
20028impl MISSION_REQUEST_INT_DATA {
20029    pub const ENCODED_LEN: usize = 5usize;
20030    pub const DEFAULT: Self = Self {
20031        seq: 0_u16,
20032        target_system: 0_u8,
20033        target_component: 0_u8,
20034        mission_type: MavMissionType::DEFAULT,
20035    };
20036    #[cfg(feature = "arbitrary")]
20037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20038        use arbitrary::{Arbitrary, Unstructured};
20039        let mut buf = [0u8; 1024];
20040        rng.fill_bytes(&mut buf);
20041        let mut unstructured = Unstructured::new(&buf);
20042        Self::arbitrary(&mut unstructured).unwrap_or_default()
20043    }
20044}
20045impl Default for MISSION_REQUEST_INT_DATA {
20046    fn default() -> Self {
20047        Self::DEFAULT.clone()
20048    }
20049}
20050impl MessageData for MISSION_REQUEST_INT_DATA {
20051    type Message = MavMessage;
20052    const ID: u32 = 51u32;
20053    const NAME: &'static str = "MISSION_REQUEST_INT";
20054    const EXTRA_CRC: u8 = 196u8;
20055    const ENCODED_LEN: usize = 5usize;
20056    fn deser(
20057        _version: MavlinkVersion,
20058        __input: &[u8],
20059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20060        let avail_len = __input.len();
20061        let mut payload_buf = [0; Self::ENCODED_LEN];
20062        let mut buf = if avail_len < Self::ENCODED_LEN {
20063            payload_buf[0..avail_len].copy_from_slice(__input);
20064            Bytes::new(&payload_buf)
20065        } else {
20066            Bytes::new(__input)
20067        };
20068        let mut __struct = Self::default();
20069        __struct.seq = buf.get_u16_le();
20070        __struct.target_system = buf.get_u8();
20071        __struct.target_component = buf.get_u8();
20072        let tmp = buf.get_u8();
20073        __struct.mission_type =
20074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20075                enum_type: "MavMissionType",
20076                value: tmp as u64,
20077            })?;
20078        Ok(__struct)
20079    }
20080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20081        let mut __tmp = BytesMut::new(bytes);
20082        #[allow(clippy::absurd_extreme_comparisons)]
20083        #[allow(unused_comparisons)]
20084        if __tmp.remaining() < Self::ENCODED_LEN {
20085            panic!(
20086                "buffer is too small (need {} bytes, but got {})",
20087                Self::ENCODED_LEN,
20088                __tmp.remaining(),
20089            )
20090        }
20091        __tmp.put_u16_le(self.seq);
20092        __tmp.put_u8(self.target_system);
20093        __tmp.put_u8(self.target_component);
20094        if matches!(version, MavlinkVersion::V2) {
20095            __tmp.put_u8(self.mission_type as u8);
20096            let len = __tmp.len();
20097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20098        } else {
20099            __tmp.len()
20100        }
20101    }
20102}
20103#[doc = "Request the overall list of mission items from the system/component."]
20104#[doc = ""]
20105#[doc = "ID: 43"]
20106#[derive(Debug, Clone, PartialEq)]
20107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20109#[cfg_attr(feature = "ts", derive(TS))]
20110#[cfg_attr(feature = "ts", ts(export))]
20111pub struct MISSION_REQUEST_LIST_DATA {
20112    #[doc = "System ID"]
20113    pub target_system: u8,
20114    #[doc = "Component ID"]
20115    pub target_component: u8,
20116    #[doc = "Mission type."]
20117    #[cfg_attr(feature = "serde", serde(default))]
20118    pub mission_type: MavMissionType,
20119}
20120impl MISSION_REQUEST_LIST_DATA {
20121    pub const ENCODED_LEN: usize = 3usize;
20122    pub const DEFAULT: Self = Self {
20123        target_system: 0_u8,
20124        target_component: 0_u8,
20125        mission_type: MavMissionType::DEFAULT,
20126    };
20127    #[cfg(feature = "arbitrary")]
20128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20129        use arbitrary::{Arbitrary, Unstructured};
20130        let mut buf = [0u8; 1024];
20131        rng.fill_bytes(&mut buf);
20132        let mut unstructured = Unstructured::new(&buf);
20133        Self::arbitrary(&mut unstructured).unwrap_or_default()
20134    }
20135}
20136impl Default for MISSION_REQUEST_LIST_DATA {
20137    fn default() -> Self {
20138        Self::DEFAULT.clone()
20139    }
20140}
20141impl MessageData for MISSION_REQUEST_LIST_DATA {
20142    type Message = MavMessage;
20143    const ID: u32 = 43u32;
20144    const NAME: &'static str = "MISSION_REQUEST_LIST";
20145    const EXTRA_CRC: u8 = 132u8;
20146    const ENCODED_LEN: usize = 3usize;
20147    fn deser(
20148        _version: MavlinkVersion,
20149        __input: &[u8],
20150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20151        let avail_len = __input.len();
20152        let mut payload_buf = [0; Self::ENCODED_LEN];
20153        let mut buf = if avail_len < Self::ENCODED_LEN {
20154            payload_buf[0..avail_len].copy_from_slice(__input);
20155            Bytes::new(&payload_buf)
20156        } else {
20157            Bytes::new(__input)
20158        };
20159        let mut __struct = Self::default();
20160        __struct.target_system = buf.get_u8();
20161        __struct.target_component = buf.get_u8();
20162        let tmp = buf.get_u8();
20163        __struct.mission_type =
20164            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20165                enum_type: "MavMissionType",
20166                value: tmp as u64,
20167            })?;
20168        Ok(__struct)
20169    }
20170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20171        let mut __tmp = BytesMut::new(bytes);
20172        #[allow(clippy::absurd_extreme_comparisons)]
20173        #[allow(unused_comparisons)]
20174        if __tmp.remaining() < Self::ENCODED_LEN {
20175            panic!(
20176                "buffer is too small (need {} bytes, but got {})",
20177                Self::ENCODED_LEN,
20178                __tmp.remaining(),
20179            )
20180        }
20181        __tmp.put_u8(self.target_system);
20182        __tmp.put_u8(self.target_component);
20183        if matches!(version, MavlinkVersion::V2) {
20184            __tmp.put_u8(self.mission_type as u8);
20185            let len = __tmp.len();
20186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20187        } else {
20188            __tmp.len()
20189        }
20190    }
20191}
20192#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20193#[doc = ""]
20194#[doc = "ID: 37"]
20195#[derive(Debug, Clone, PartialEq)]
20196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20198#[cfg_attr(feature = "ts", derive(TS))]
20199#[cfg_attr(feature = "ts", ts(export))]
20200pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20201    #[doc = "Start index"]
20202    pub start_index: i16,
20203    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20204    pub end_index: i16,
20205    #[doc = "System ID"]
20206    pub target_system: u8,
20207    #[doc = "Component ID"]
20208    pub target_component: u8,
20209    #[doc = "Mission type."]
20210    #[cfg_attr(feature = "serde", serde(default))]
20211    pub mission_type: MavMissionType,
20212}
20213impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20214    pub const ENCODED_LEN: usize = 7usize;
20215    pub const DEFAULT: Self = Self {
20216        start_index: 0_i16,
20217        end_index: 0_i16,
20218        target_system: 0_u8,
20219        target_component: 0_u8,
20220        mission_type: MavMissionType::DEFAULT,
20221    };
20222    #[cfg(feature = "arbitrary")]
20223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20224        use arbitrary::{Arbitrary, Unstructured};
20225        let mut buf = [0u8; 1024];
20226        rng.fill_bytes(&mut buf);
20227        let mut unstructured = Unstructured::new(&buf);
20228        Self::arbitrary(&mut unstructured).unwrap_or_default()
20229    }
20230}
20231impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20232    fn default() -> Self {
20233        Self::DEFAULT.clone()
20234    }
20235}
20236impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20237    type Message = MavMessage;
20238    const ID: u32 = 37u32;
20239    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20240    const EXTRA_CRC: u8 = 212u8;
20241    const ENCODED_LEN: usize = 7usize;
20242    fn deser(
20243        _version: MavlinkVersion,
20244        __input: &[u8],
20245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20246        let avail_len = __input.len();
20247        let mut payload_buf = [0; Self::ENCODED_LEN];
20248        let mut buf = if avail_len < Self::ENCODED_LEN {
20249            payload_buf[0..avail_len].copy_from_slice(__input);
20250            Bytes::new(&payload_buf)
20251        } else {
20252            Bytes::new(__input)
20253        };
20254        let mut __struct = Self::default();
20255        __struct.start_index = buf.get_i16_le();
20256        __struct.end_index = buf.get_i16_le();
20257        __struct.target_system = buf.get_u8();
20258        __struct.target_component = buf.get_u8();
20259        let tmp = buf.get_u8();
20260        __struct.mission_type =
20261            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20262                enum_type: "MavMissionType",
20263                value: tmp as u64,
20264            })?;
20265        Ok(__struct)
20266    }
20267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20268        let mut __tmp = BytesMut::new(bytes);
20269        #[allow(clippy::absurd_extreme_comparisons)]
20270        #[allow(unused_comparisons)]
20271        if __tmp.remaining() < Self::ENCODED_LEN {
20272            panic!(
20273                "buffer is too small (need {} bytes, but got {})",
20274                Self::ENCODED_LEN,
20275                __tmp.remaining(),
20276            )
20277        }
20278        __tmp.put_i16_le(self.start_index);
20279        __tmp.put_i16_le(self.end_index);
20280        __tmp.put_u8(self.target_system);
20281        __tmp.put_u8(self.target_component);
20282        if matches!(version, MavlinkVersion::V2) {
20283            __tmp.put_u8(self.mission_type as u8);
20284            let len = __tmp.len();
20285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20286        } else {
20287            __tmp.len()
20288        }
20289    }
20290}
20291#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20292#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20293#[doc = ""]
20294#[doc = "ID: 41"]
20295#[derive(Debug, Clone, PartialEq)]
20296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20298#[cfg_attr(feature = "ts", derive(TS))]
20299#[cfg_attr(feature = "ts", ts(export))]
20300pub struct MISSION_SET_CURRENT_DATA {
20301    #[doc = "Sequence"]
20302    pub seq: u16,
20303    #[doc = "System ID"]
20304    pub target_system: u8,
20305    #[doc = "Component ID"]
20306    pub target_component: u8,
20307}
20308impl MISSION_SET_CURRENT_DATA {
20309    pub const ENCODED_LEN: usize = 4usize;
20310    pub const DEFAULT: Self = Self {
20311        seq: 0_u16,
20312        target_system: 0_u8,
20313        target_component: 0_u8,
20314    };
20315    #[cfg(feature = "arbitrary")]
20316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20317        use arbitrary::{Arbitrary, Unstructured};
20318        let mut buf = [0u8; 1024];
20319        rng.fill_bytes(&mut buf);
20320        let mut unstructured = Unstructured::new(&buf);
20321        Self::arbitrary(&mut unstructured).unwrap_or_default()
20322    }
20323}
20324impl Default for MISSION_SET_CURRENT_DATA {
20325    fn default() -> Self {
20326        Self::DEFAULT.clone()
20327    }
20328}
20329impl MessageData for MISSION_SET_CURRENT_DATA {
20330    type Message = MavMessage;
20331    const ID: u32 = 41u32;
20332    const NAME: &'static str = "MISSION_SET_CURRENT";
20333    const EXTRA_CRC: u8 = 28u8;
20334    const ENCODED_LEN: usize = 4usize;
20335    fn deser(
20336        _version: MavlinkVersion,
20337        __input: &[u8],
20338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20339        let avail_len = __input.len();
20340        let mut payload_buf = [0; Self::ENCODED_LEN];
20341        let mut buf = if avail_len < Self::ENCODED_LEN {
20342            payload_buf[0..avail_len].copy_from_slice(__input);
20343            Bytes::new(&payload_buf)
20344        } else {
20345            Bytes::new(__input)
20346        };
20347        let mut __struct = Self::default();
20348        __struct.seq = buf.get_u16_le();
20349        __struct.target_system = buf.get_u8();
20350        __struct.target_component = buf.get_u8();
20351        Ok(__struct)
20352    }
20353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20354        let mut __tmp = BytesMut::new(bytes);
20355        #[allow(clippy::absurd_extreme_comparisons)]
20356        #[allow(unused_comparisons)]
20357        if __tmp.remaining() < Self::ENCODED_LEN {
20358            panic!(
20359                "buffer is too small (need {} bytes, but got {})",
20360                Self::ENCODED_LEN,
20361                __tmp.remaining(),
20362            )
20363        }
20364        __tmp.put_u16_le(self.seq);
20365        __tmp.put_u8(self.target_system);
20366        __tmp.put_u8(self.target_component);
20367        if matches!(version, MavlinkVersion::V2) {
20368            let len = __tmp.len();
20369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20370        } else {
20371            __tmp.len()
20372        }
20373    }
20374}
20375#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20376#[doc = ""]
20377#[doc = "ID: 38"]
20378#[derive(Debug, Clone, PartialEq)]
20379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20381#[cfg_attr(feature = "ts", derive(TS))]
20382#[cfg_attr(feature = "ts", ts(export))]
20383pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20384    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20385    pub start_index: i16,
20386    #[doc = "End index, equal or greater than start index."]
20387    pub end_index: i16,
20388    #[doc = "System ID"]
20389    pub target_system: u8,
20390    #[doc = "Component ID"]
20391    pub target_component: u8,
20392    #[doc = "Mission type."]
20393    #[cfg_attr(feature = "serde", serde(default))]
20394    pub mission_type: MavMissionType,
20395}
20396impl MISSION_WRITE_PARTIAL_LIST_DATA {
20397    pub const ENCODED_LEN: usize = 7usize;
20398    pub const DEFAULT: Self = Self {
20399        start_index: 0_i16,
20400        end_index: 0_i16,
20401        target_system: 0_u8,
20402        target_component: 0_u8,
20403        mission_type: MavMissionType::DEFAULT,
20404    };
20405    #[cfg(feature = "arbitrary")]
20406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20407        use arbitrary::{Arbitrary, Unstructured};
20408        let mut buf = [0u8; 1024];
20409        rng.fill_bytes(&mut buf);
20410        let mut unstructured = Unstructured::new(&buf);
20411        Self::arbitrary(&mut unstructured).unwrap_or_default()
20412    }
20413}
20414impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20415    fn default() -> Self {
20416        Self::DEFAULT.clone()
20417    }
20418}
20419impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20420    type Message = MavMessage;
20421    const ID: u32 = 38u32;
20422    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20423    const EXTRA_CRC: u8 = 9u8;
20424    const ENCODED_LEN: usize = 7usize;
20425    fn deser(
20426        _version: MavlinkVersion,
20427        __input: &[u8],
20428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20429        let avail_len = __input.len();
20430        let mut payload_buf = [0; Self::ENCODED_LEN];
20431        let mut buf = if avail_len < Self::ENCODED_LEN {
20432            payload_buf[0..avail_len].copy_from_slice(__input);
20433            Bytes::new(&payload_buf)
20434        } else {
20435            Bytes::new(__input)
20436        };
20437        let mut __struct = Self::default();
20438        __struct.start_index = buf.get_i16_le();
20439        __struct.end_index = buf.get_i16_le();
20440        __struct.target_system = buf.get_u8();
20441        __struct.target_component = buf.get_u8();
20442        let tmp = buf.get_u8();
20443        __struct.mission_type =
20444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20445                enum_type: "MavMissionType",
20446                value: tmp as u64,
20447            })?;
20448        Ok(__struct)
20449    }
20450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20451        let mut __tmp = BytesMut::new(bytes);
20452        #[allow(clippy::absurd_extreme_comparisons)]
20453        #[allow(unused_comparisons)]
20454        if __tmp.remaining() < Self::ENCODED_LEN {
20455            panic!(
20456                "buffer is too small (need {} bytes, but got {})",
20457                Self::ENCODED_LEN,
20458                __tmp.remaining(),
20459            )
20460        }
20461        __tmp.put_i16_le(self.start_index);
20462        __tmp.put_i16_le(self.end_index);
20463        __tmp.put_u8(self.target_system);
20464        __tmp.put_u8(self.target_component);
20465        if matches!(version, MavlinkVersion::V2) {
20466            __tmp.put_u8(self.mission_type as u8);
20467            let len = __tmp.len();
20468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20469        } else {
20470            __tmp.len()
20471        }
20472    }
20473}
20474#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20475#[doc = "Orientation of a mount."]
20476#[doc = ""]
20477#[doc = "ID: 265"]
20478#[derive(Debug, Clone, PartialEq)]
20479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20481#[cfg_attr(feature = "ts", derive(TS))]
20482#[cfg_attr(feature = "ts", ts(export))]
20483pub struct MOUNT_ORIENTATION_DATA {
20484    #[doc = "Timestamp (time since system boot)."]
20485    pub time_boot_ms: u32,
20486    #[doc = "Roll in global frame (set to NaN for invalid)."]
20487    pub roll: f32,
20488    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20489    pub pitch: f32,
20490    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20491    pub yaw: f32,
20492    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20494    pub yaw_absolute: f32,
20495}
20496impl MOUNT_ORIENTATION_DATA {
20497    pub const ENCODED_LEN: usize = 20usize;
20498    pub const DEFAULT: Self = Self {
20499        time_boot_ms: 0_u32,
20500        roll: 0.0_f32,
20501        pitch: 0.0_f32,
20502        yaw: 0.0_f32,
20503        yaw_absolute: 0.0_f32,
20504    };
20505    #[cfg(feature = "arbitrary")]
20506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20507        use arbitrary::{Arbitrary, Unstructured};
20508        let mut buf = [0u8; 1024];
20509        rng.fill_bytes(&mut buf);
20510        let mut unstructured = Unstructured::new(&buf);
20511        Self::arbitrary(&mut unstructured).unwrap_or_default()
20512    }
20513}
20514impl Default for MOUNT_ORIENTATION_DATA {
20515    fn default() -> Self {
20516        Self::DEFAULT.clone()
20517    }
20518}
20519impl MessageData for MOUNT_ORIENTATION_DATA {
20520    type Message = MavMessage;
20521    const ID: u32 = 265u32;
20522    const NAME: &'static str = "MOUNT_ORIENTATION";
20523    const EXTRA_CRC: u8 = 26u8;
20524    const ENCODED_LEN: usize = 20usize;
20525    fn deser(
20526        _version: MavlinkVersion,
20527        __input: &[u8],
20528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20529        let avail_len = __input.len();
20530        let mut payload_buf = [0; Self::ENCODED_LEN];
20531        let mut buf = if avail_len < Self::ENCODED_LEN {
20532            payload_buf[0..avail_len].copy_from_slice(__input);
20533            Bytes::new(&payload_buf)
20534        } else {
20535            Bytes::new(__input)
20536        };
20537        let mut __struct = Self::default();
20538        __struct.time_boot_ms = buf.get_u32_le();
20539        __struct.roll = buf.get_f32_le();
20540        __struct.pitch = buf.get_f32_le();
20541        __struct.yaw = buf.get_f32_le();
20542        __struct.yaw_absolute = buf.get_f32_le();
20543        Ok(__struct)
20544    }
20545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20546        let mut __tmp = BytesMut::new(bytes);
20547        #[allow(clippy::absurd_extreme_comparisons)]
20548        #[allow(unused_comparisons)]
20549        if __tmp.remaining() < Self::ENCODED_LEN {
20550            panic!(
20551                "buffer is too small (need {} bytes, but got {})",
20552                Self::ENCODED_LEN,
20553                __tmp.remaining(),
20554            )
20555        }
20556        __tmp.put_u32_le(self.time_boot_ms);
20557        __tmp.put_f32_le(self.roll);
20558        __tmp.put_f32_le(self.pitch);
20559        __tmp.put_f32_le(self.yaw);
20560        if matches!(version, MavlinkVersion::V2) {
20561            __tmp.put_f32_le(self.yaw_absolute);
20562            let len = __tmp.len();
20563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20564        } else {
20565            __tmp.len()
20566        }
20567    }
20568}
20569#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20570#[doc = ""]
20571#[doc = "ID: 251"]
20572#[derive(Debug, Clone, PartialEq)]
20573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20575#[cfg_attr(feature = "ts", derive(TS))]
20576#[cfg_attr(feature = "ts", ts(export))]
20577pub struct NAMED_VALUE_FLOAT_DATA {
20578    #[doc = "Timestamp (time since system boot)."]
20579    pub time_boot_ms: u32,
20580    #[doc = "Floating point value"]
20581    pub value: f32,
20582    #[doc = "Name of the debug variable"]
20583    #[cfg_attr(feature = "ts", ts(type = "string"))]
20584    pub name: CharArray<10>,
20585}
20586impl NAMED_VALUE_FLOAT_DATA {
20587    pub const ENCODED_LEN: usize = 18usize;
20588    pub const DEFAULT: Self = Self {
20589        time_boot_ms: 0_u32,
20590        value: 0.0_f32,
20591        name: CharArray::new([0_u8; 10usize]),
20592    };
20593    #[cfg(feature = "arbitrary")]
20594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20595        use arbitrary::{Arbitrary, Unstructured};
20596        let mut buf = [0u8; 1024];
20597        rng.fill_bytes(&mut buf);
20598        let mut unstructured = Unstructured::new(&buf);
20599        Self::arbitrary(&mut unstructured).unwrap_or_default()
20600    }
20601}
20602impl Default for NAMED_VALUE_FLOAT_DATA {
20603    fn default() -> Self {
20604        Self::DEFAULT.clone()
20605    }
20606}
20607impl MessageData for NAMED_VALUE_FLOAT_DATA {
20608    type Message = MavMessage;
20609    const ID: u32 = 251u32;
20610    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20611    const EXTRA_CRC: u8 = 170u8;
20612    const ENCODED_LEN: usize = 18usize;
20613    fn deser(
20614        _version: MavlinkVersion,
20615        __input: &[u8],
20616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20617        let avail_len = __input.len();
20618        let mut payload_buf = [0; Self::ENCODED_LEN];
20619        let mut buf = if avail_len < Self::ENCODED_LEN {
20620            payload_buf[0..avail_len].copy_from_slice(__input);
20621            Bytes::new(&payload_buf)
20622        } else {
20623            Bytes::new(__input)
20624        };
20625        let mut __struct = Self::default();
20626        __struct.time_boot_ms = buf.get_u32_le();
20627        __struct.value = buf.get_f32_le();
20628        let mut tmp = [0_u8; 10usize];
20629        for v in &mut tmp {
20630            *v = buf.get_u8();
20631        }
20632        __struct.name = CharArray::new(tmp);
20633        Ok(__struct)
20634    }
20635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20636        let mut __tmp = BytesMut::new(bytes);
20637        #[allow(clippy::absurd_extreme_comparisons)]
20638        #[allow(unused_comparisons)]
20639        if __tmp.remaining() < Self::ENCODED_LEN {
20640            panic!(
20641                "buffer is too small (need {} bytes, but got {})",
20642                Self::ENCODED_LEN,
20643                __tmp.remaining(),
20644            )
20645        }
20646        __tmp.put_u32_le(self.time_boot_ms);
20647        __tmp.put_f32_le(self.value);
20648        for val in &self.name {
20649            __tmp.put_u8(*val);
20650        }
20651        if matches!(version, MavlinkVersion::V2) {
20652            let len = __tmp.len();
20653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20654        } else {
20655            __tmp.len()
20656        }
20657    }
20658}
20659#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20660#[doc = ""]
20661#[doc = "ID: 252"]
20662#[derive(Debug, Clone, PartialEq)]
20663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20665#[cfg_attr(feature = "ts", derive(TS))]
20666#[cfg_attr(feature = "ts", ts(export))]
20667pub struct NAMED_VALUE_INT_DATA {
20668    #[doc = "Timestamp (time since system boot)."]
20669    pub time_boot_ms: u32,
20670    #[doc = "Signed integer value"]
20671    pub value: i32,
20672    #[doc = "Name of the debug variable"]
20673    #[cfg_attr(feature = "ts", ts(type = "string"))]
20674    pub name: CharArray<10>,
20675}
20676impl NAMED_VALUE_INT_DATA {
20677    pub const ENCODED_LEN: usize = 18usize;
20678    pub const DEFAULT: Self = Self {
20679        time_boot_ms: 0_u32,
20680        value: 0_i32,
20681        name: CharArray::new([0_u8; 10usize]),
20682    };
20683    #[cfg(feature = "arbitrary")]
20684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20685        use arbitrary::{Arbitrary, Unstructured};
20686        let mut buf = [0u8; 1024];
20687        rng.fill_bytes(&mut buf);
20688        let mut unstructured = Unstructured::new(&buf);
20689        Self::arbitrary(&mut unstructured).unwrap_or_default()
20690    }
20691}
20692impl Default for NAMED_VALUE_INT_DATA {
20693    fn default() -> Self {
20694        Self::DEFAULT.clone()
20695    }
20696}
20697impl MessageData for NAMED_VALUE_INT_DATA {
20698    type Message = MavMessage;
20699    const ID: u32 = 252u32;
20700    const NAME: &'static str = "NAMED_VALUE_INT";
20701    const EXTRA_CRC: u8 = 44u8;
20702    const ENCODED_LEN: usize = 18usize;
20703    fn deser(
20704        _version: MavlinkVersion,
20705        __input: &[u8],
20706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20707        let avail_len = __input.len();
20708        let mut payload_buf = [0; Self::ENCODED_LEN];
20709        let mut buf = if avail_len < Self::ENCODED_LEN {
20710            payload_buf[0..avail_len].copy_from_slice(__input);
20711            Bytes::new(&payload_buf)
20712        } else {
20713            Bytes::new(__input)
20714        };
20715        let mut __struct = Self::default();
20716        __struct.time_boot_ms = buf.get_u32_le();
20717        __struct.value = buf.get_i32_le();
20718        let mut tmp = [0_u8; 10usize];
20719        for v in &mut tmp {
20720            *v = buf.get_u8();
20721        }
20722        __struct.name = CharArray::new(tmp);
20723        Ok(__struct)
20724    }
20725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20726        let mut __tmp = BytesMut::new(bytes);
20727        #[allow(clippy::absurd_extreme_comparisons)]
20728        #[allow(unused_comparisons)]
20729        if __tmp.remaining() < Self::ENCODED_LEN {
20730            panic!(
20731                "buffer is too small (need {} bytes, but got {})",
20732                Self::ENCODED_LEN,
20733                __tmp.remaining(),
20734            )
20735        }
20736        __tmp.put_u32_le(self.time_boot_ms);
20737        __tmp.put_i32_le(self.value);
20738        for val in &self.name {
20739            __tmp.put_u8(*val);
20740        }
20741        if matches!(version, MavlinkVersion::V2) {
20742            let len = __tmp.len();
20743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20744        } else {
20745            __tmp.len()
20746        }
20747    }
20748}
20749#[doc = "The state of the navigation and position controller."]
20750#[doc = ""]
20751#[doc = "ID: 62"]
20752#[derive(Debug, Clone, PartialEq)]
20753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20755#[cfg_attr(feature = "ts", derive(TS))]
20756#[cfg_attr(feature = "ts", ts(export))]
20757pub struct NAV_CONTROLLER_OUTPUT_DATA {
20758    #[doc = "Current desired roll"]
20759    pub nav_roll: f32,
20760    #[doc = "Current desired pitch"]
20761    pub nav_pitch: f32,
20762    #[doc = "Current altitude error"]
20763    pub alt_error: f32,
20764    #[doc = "Current airspeed error"]
20765    pub aspd_error: f32,
20766    #[doc = "Current crosstrack error on x-y plane"]
20767    pub xtrack_error: f32,
20768    #[doc = "Current desired heading"]
20769    pub nav_bearing: i16,
20770    #[doc = "Bearing to current waypoint/target"]
20771    pub target_bearing: i16,
20772    #[doc = "Distance to active waypoint"]
20773    pub wp_dist: u16,
20774}
20775impl NAV_CONTROLLER_OUTPUT_DATA {
20776    pub const ENCODED_LEN: usize = 26usize;
20777    pub const DEFAULT: Self = Self {
20778        nav_roll: 0.0_f32,
20779        nav_pitch: 0.0_f32,
20780        alt_error: 0.0_f32,
20781        aspd_error: 0.0_f32,
20782        xtrack_error: 0.0_f32,
20783        nav_bearing: 0_i16,
20784        target_bearing: 0_i16,
20785        wp_dist: 0_u16,
20786    };
20787    #[cfg(feature = "arbitrary")]
20788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20789        use arbitrary::{Arbitrary, Unstructured};
20790        let mut buf = [0u8; 1024];
20791        rng.fill_bytes(&mut buf);
20792        let mut unstructured = Unstructured::new(&buf);
20793        Self::arbitrary(&mut unstructured).unwrap_or_default()
20794    }
20795}
20796impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20797    fn default() -> Self {
20798        Self::DEFAULT.clone()
20799    }
20800}
20801impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20802    type Message = MavMessage;
20803    const ID: u32 = 62u32;
20804    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20805    const EXTRA_CRC: u8 = 183u8;
20806    const ENCODED_LEN: usize = 26usize;
20807    fn deser(
20808        _version: MavlinkVersion,
20809        __input: &[u8],
20810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20811        let avail_len = __input.len();
20812        let mut payload_buf = [0; Self::ENCODED_LEN];
20813        let mut buf = if avail_len < Self::ENCODED_LEN {
20814            payload_buf[0..avail_len].copy_from_slice(__input);
20815            Bytes::new(&payload_buf)
20816        } else {
20817            Bytes::new(__input)
20818        };
20819        let mut __struct = Self::default();
20820        __struct.nav_roll = buf.get_f32_le();
20821        __struct.nav_pitch = buf.get_f32_le();
20822        __struct.alt_error = buf.get_f32_le();
20823        __struct.aspd_error = buf.get_f32_le();
20824        __struct.xtrack_error = buf.get_f32_le();
20825        __struct.nav_bearing = buf.get_i16_le();
20826        __struct.target_bearing = buf.get_i16_le();
20827        __struct.wp_dist = buf.get_u16_le();
20828        Ok(__struct)
20829    }
20830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20831        let mut __tmp = BytesMut::new(bytes);
20832        #[allow(clippy::absurd_extreme_comparisons)]
20833        #[allow(unused_comparisons)]
20834        if __tmp.remaining() < Self::ENCODED_LEN {
20835            panic!(
20836                "buffer is too small (need {} bytes, but got {})",
20837                Self::ENCODED_LEN,
20838                __tmp.remaining(),
20839            )
20840        }
20841        __tmp.put_f32_le(self.nav_roll);
20842        __tmp.put_f32_le(self.nav_pitch);
20843        __tmp.put_f32_le(self.alt_error);
20844        __tmp.put_f32_le(self.aspd_error);
20845        __tmp.put_f32_le(self.xtrack_error);
20846        __tmp.put_i16_le(self.nav_bearing);
20847        __tmp.put_i16_le(self.target_bearing);
20848        __tmp.put_u16_le(self.wp_dist);
20849        if matches!(version, MavlinkVersion::V2) {
20850            let len = __tmp.len();
20851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20852        } else {
20853            __tmp.len()
20854        }
20855    }
20856}
20857#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20858#[doc = ""]
20859#[doc = "ID: 330"]
20860#[derive(Debug, Clone, PartialEq)]
20861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20863#[cfg_attr(feature = "ts", derive(TS))]
20864#[cfg_attr(feature = "ts", ts(export))]
20865pub struct OBSTACLE_DISTANCE_DATA {
20866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20867    pub time_usec: u64,
20868    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20871    pub distances: [u16; 72],
20872    #[doc = "Minimum distance the sensor can measure."]
20873    pub min_distance: u16,
20874    #[doc = "Maximum distance the sensor can measure."]
20875    pub max_distance: u16,
20876    #[doc = "Class id of the distance sensor type."]
20877    pub sensor_type: MavDistanceSensor,
20878    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20879    pub increment: u8,
20880    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20882    pub increment_f: f32,
20883    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20885    pub angle_offset: f32,
20886    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20887    #[cfg_attr(feature = "serde", serde(default))]
20888    pub frame: MavFrame,
20889}
20890impl OBSTACLE_DISTANCE_DATA {
20891    pub const ENCODED_LEN: usize = 167usize;
20892    pub const DEFAULT: Self = Self {
20893        time_usec: 0_u64,
20894        distances: [0_u16; 72usize],
20895        min_distance: 0_u16,
20896        max_distance: 0_u16,
20897        sensor_type: MavDistanceSensor::DEFAULT,
20898        increment: 0_u8,
20899        increment_f: 0.0_f32,
20900        angle_offset: 0.0_f32,
20901        frame: MavFrame::DEFAULT,
20902    };
20903    #[cfg(feature = "arbitrary")]
20904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20905        use arbitrary::{Arbitrary, Unstructured};
20906        let mut buf = [0u8; 1024];
20907        rng.fill_bytes(&mut buf);
20908        let mut unstructured = Unstructured::new(&buf);
20909        Self::arbitrary(&mut unstructured).unwrap_or_default()
20910    }
20911}
20912impl Default for OBSTACLE_DISTANCE_DATA {
20913    fn default() -> Self {
20914        Self::DEFAULT.clone()
20915    }
20916}
20917impl MessageData for OBSTACLE_DISTANCE_DATA {
20918    type Message = MavMessage;
20919    const ID: u32 = 330u32;
20920    const NAME: &'static str = "OBSTACLE_DISTANCE";
20921    const EXTRA_CRC: u8 = 23u8;
20922    const ENCODED_LEN: usize = 167usize;
20923    fn deser(
20924        _version: MavlinkVersion,
20925        __input: &[u8],
20926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20927        let avail_len = __input.len();
20928        let mut payload_buf = [0; Self::ENCODED_LEN];
20929        let mut buf = if avail_len < Self::ENCODED_LEN {
20930            payload_buf[0..avail_len].copy_from_slice(__input);
20931            Bytes::new(&payload_buf)
20932        } else {
20933            Bytes::new(__input)
20934        };
20935        let mut __struct = Self::default();
20936        __struct.time_usec = buf.get_u64_le();
20937        for v in &mut __struct.distances {
20938            let val = buf.get_u16_le();
20939            *v = val;
20940        }
20941        __struct.min_distance = buf.get_u16_le();
20942        __struct.max_distance = buf.get_u16_le();
20943        let tmp = buf.get_u8();
20944        __struct.sensor_type =
20945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20946                enum_type: "MavDistanceSensor",
20947                value: tmp as u64,
20948            })?;
20949        __struct.increment = buf.get_u8();
20950        __struct.increment_f = buf.get_f32_le();
20951        __struct.angle_offset = buf.get_f32_le();
20952        let tmp = buf.get_u8();
20953        __struct.frame =
20954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20955                enum_type: "MavFrame",
20956                value: tmp as u64,
20957            })?;
20958        Ok(__struct)
20959    }
20960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20961        let mut __tmp = BytesMut::new(bytes);
20962        #[allow(clippy::absurd_extreme_comparisons)]
20963        #[allow(unused_comparisons)]
20964        if __tmp.remaining() < Self::ENCODED_LEN {
20965            panic!(
20966                "buffer is too small (need {} bytes, but got {})",
20967                Self::ENCODED_LEN,
20968                __tmp.remaining(),
20969            )
20970        }
20971        __tmp.put_u64_le(self.time_usec);
20972        for val in &self.distances {
20973            __tmp.put_u16_le(*val);
20974        }
20975        __tmp.put_u16_le(self.min_distance);
20976        __tmp.put_u16_le(self.max_distance);
20977        __tmp.put_u8(self.sensor_type as u8);
20978        __tmp.put_u8(self.increment);
20979        if matches!(version, MavlinkVersion::V2) {
20980            __tmp.put_f32_le(self.increment_f);
20981            __tmp.put_f32_le(self.angle_offset);
20982            __tmp.put_u8(self.frame as u8);
20983            let len = __tmp.len();
20984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20985        } else {
20986            __tmp.len()
20987        }
20988    }
20989}
20990#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20991#[doc = ""]
20992#[doc = "ID: 331"]
20993#[derive(Debug, Clone, PartialEq)]
20994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20996#[cfg_attr(feature = "ts", derive(TS))]
20997#[cfg_attr(feature = "ts", ts(export))]
20998pub struct ODOMETRY_DATA {
20999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21000    pub time_usec: u64,
21001    #[doc = "X Position"]
21002    pub x: f32,
21003    #[doc = "Y Position"]
21004    pub y: f32,
21005    #[doc = "Z Position"]
21006    pub z: f32,
21007    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21010    pub q: [f32; 4],
21011    #[doc = "X linear speed"]
21012    pub vx: f32,
21013    #[doc = "Y linear speed"]
21014    pub vy: f32,
21015    #[doc = "Z linear speed"]
21016    pub vz: f32,
21017    #[doc = "Roll angular speed"]
21018    pub rollspeed: f32,
21019    #[doc = "Pitch angular speed"]
21020    pub pitchspeed: f32,
21021    #[doc = "Yaw angular speed"]
21022    pub yawspeed: f32,
21023    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21026    pub pose_covariance: [f32; 21],
21027    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21028    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21029    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21030    pub velocity_covariance: [f32; 21],
21031    #[doc = "Coordinate frame of reference for the pose data."]
21032    pub frame_id: MavFrame,
21033    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21034    pub child_frame_id: MavFrame,
21035    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21036    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21037    pub reset_counter: u8,
21038    #[doc = "Type of estimator that is providing the odometry."]
21039    #[cfg_attr(feature = "serde", serde(default))]
21040    pub estimator_type: MavEstimatorType,
21041    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21042    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21043    pub quality: i8,
21044}
21045impl ODOMETRY_DATA {
21046    pub const ENCODED_LEN: usize = 233usize;
21047    pub const DEFAULT: Self = Self {
21048        time_usec: 0_u64,
21049        x: 0.0_f32,
21050        y: 0.0_f32,
21051        z: 0.0_f32,
21052        q: [0.0_f32; 4usize],
21053        vx: 0.0_f32,
21054        vy: 0.0_f32,
21055        vz: 0.0_f32,
21056        rollspeed: 0.0_f32,
21057        pitchspeed: 0.0_f32,
21058        yawspeed: 0.0_f32,
21059        pose_covariance: [0.0_f32; 21usize],
21060        velocity_covariance: [0.0_f32; 21usize],
21061        frame_id: MavFrame::DEFAULT,
21062        child_frame_id: MavFrame::DEFAULT,
21063        reset_counter: 0_u8,
21064        estimator_type: MavEstimatorType::DEFAULT,
21065        quality: 0_i8,
21066    };
21067    #[cfg(feature = "arbitrary")]
21068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21069        use arbitrary::{Arbitrary, Unstructured};
21070        let mut buf = [0u8; 1024];
21071        rng.fill_bytes(&mut buf);
21072        let mut unstructured = Unstructured::new(&buf);
21073        Self::arbitrary(&mut unstructured).unwrap_or_default()
21074    }
21075}
21076impl Default for ODOMETRY_DATA {
21077    fn default() -> Self {
21078        Self::DEFAULT.clone()
21079    }
21080}
21081impl MessageData for ODOMETRY_DATA {
21082    type Message = MavMessage;
21083    const ID: u32 = 331u32;
21084    const NAME: &'static str = "ODOMETRY";
21085    const EXTRA_CRC: u8 = 91u8;
21086    const ENCODED_LEN: usize = 233usize;
21087    fn deser(
21088        _version: MavlinkVersion,
21089        __input: &[u8],
21090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21091        let avail_len = __input.len();
21092        let mut payload_buf = [0; Self::ENCODED_LEN];
21093        let mut buf = if avail_len < Self::ENCODED_LEN {
21094            payload_buf[0..avail_len].copy_from_slice(__input);
21095            Bytes::new(&payload_buf)
21096        } else {
21097            Bytes::new(__input)
21098        };
21099        let mut __struct = Self::default();
21100        __struct.time_usec = buf.get_u64_le();
21101        __struct.x = buf.get_f32_le();
21102        __struct.y = buf.get_f32_le();
21103        __struct.z = buf.get_f32_le();
21104        for v in &mut __struct.q {
21105            let val = buf.get_f32_le();
21106            *v = val;
21107        }
21108        __struct.vx = buf.get_f32_le();
21109        __struct.vy = buf.get_f32_le();
21110        __struct.vz = buf.get_f32_le();
21111        __struct.rollspeed = buf.get_f32_le();
21112        __struct.pitchspeed = buf.get_f32_le();
21113        __struct.yawspeed = buf.get_f32_le();
21114        for v in &mut __struct.pose_covariance {
21115            let val = buf.get_f32_le();
21116            *v = val;
21117        }
21118        for v in &mut __struct.velocity_covariance {
21119            let val = buf.get_f32_le();
21120            *v = val;
21121        }
21122        let tmp = buf.get_u8();
21123        __struct.frame_id =
21124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21125                enum_type: "MavFrame",
21126                value: tmp as u64,
21127            })?;
21128        let tmp = buf.get_u8();
21129        __struct.child_frame_id =
21130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21131                enum_type: "MavFrame",
21132                value: tmp as u64,
21133            })?;
21134        __struct.reset_counter = buf.get_u8();
21135        let tmp = buf.get_u8();
21136        __struct.estimator_type =
21137            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21138                enum_type: "MavEstimatorType",
21139                value: tmp as u64,
21140            })?;
21141        __struct.quality = buf.get_i8();
21142        Ok(__struct)
21143    }
21144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21145        let mut __tmp = BytesMut::new(bytes);
21146        #[allow(clippy::absurd_extreme_comparisons)]
21147        #[allow(unused_comparisons)]
21148        if __tmp.remaining() < Self::ENCODED_LEN {
21149            panic!(
21150                "buffer is too small (need {} bytes, but got {})",
21151                Self::ENCODED_LEN,
21152                __tmp.remaining(),
21153            )
21154        }
21155        __tmp.put_u64_le(self.time_usec);
21156        __tmp.put_f32_le(self.x);
21157        __tmp.put_f32_le(self.y);
21158        __tmp.put_f32_le(self.z);
21159        for val in &self.q {
21160            __tmp.put_f32_le(*val);
21161        }
21162        __tmp.put_f32_le(self.vx);
21163        __tmp.put_f32_le(self.vy);
21164        __tmp.put_f32_le(self.vz);
21165        __tmp.put_f32_le(self.rollspeed);
21166        __tmp.put_f32_le(self.pitchspeed);
21167        __tmp.put_f32_le(self.yawspeed);
21168        for val in &self.pose_covariance {
21169            __tmp.put_f32_le(*val);
21170        }
21171        for val in &self.velocity_covariance {
21172            __tmp.put_f32_le(*val);
21173        }
21174        __tmp.put_u8(self.frame_id as u8);
21175        __tmp.put_u8(self.child_frame_id as u8);
21176        if matches!(version, MavlinkVersion::V2) {
21177            __tmp.put_u8(self.reset_counter);
21178            __tmp.put_u8(self.estimator_type as u8);
21179            __tmp.put_i8(self.quality);
21180            let len = __tmp.len();
21181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21182        } else {
21183            __tmp.len()
21184        }
21185    }
21186}
21187#[doc = "Hardware status sent by an onboard computer."]
21188#[doc = ""]
21189#[doc = "ID: 390"]
21190#[derive(Debug, Clone, PartialEq)]
21191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21193#[cfg_attr(feature = "ts", derive(TS))]
21194#[cfg_attr(feature = "ts", ts(export))]
21195pub struct ONBOARD_COMPUTER_STATUS_DATA {
21196    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21197    pub time_usec: u64,
21198    #[doc = "Time since system boot."]
21199    pub uptime: u32,
21200    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21201    pub ram_usage: u32,
21202    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21203    pub ram_total: u32,
21204    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21206    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21207    pub storage_type: [u32; 4],
21208    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21209    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21210    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21211    pub storage_usage: [u32; 4],
21212    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21215    pub storage_total: [u32; 4],
21216    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21218    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21219    pub link_type: [u32; 6],
21220    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21221    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21222    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21223    pub link_tx_rate: [u32; 6],
21224    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21225    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21226    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21227    pub link_rx_rate: [u32; 6],
21228    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21231    pub link_tx_max: [u32; 6],
21232    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21234    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21235    pub link_rx_max: [u32; 6],
21236    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21239    pub fan_speed: [i16; 4],
21240    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21241    pub mavtype: u8,
21242    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21244    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21245    pub cpu_cores: [u8; 8],
21246    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21248    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21249    pub cpu_combined: [u8; 10],
21250    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21252    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21253    pub gpu_cores: [u8; 4],
21254    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21257    pub gpu_combined: [u8; 10],
21258    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21259    pub temperature_board: i8,
21260    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21263    pub temperature_core: [i8; 8],
21264}
21265impl ONBOARD_COMPUTER_STATUS_DATA {
21266    pub const ENCODED_LEN: usize = 238usize;
21267    pub const DEFAULT: Self = Self {
21268        time_usec: 0_u64,
21269        uptime: 0_u32,
21270        ram_usage: 0_u32,
21271        ram_total: 0_u32,
21272        storage_type: [0_u32; 4usize],
21273        storage_usage: [0_u32; 4usize],
21274        storage_total: [0_u32; 4usize],
21275        link_type: [0_u32; 6usize],
21276        link_tx_rate: [0_u32; 6usize],
21277        link_rx_rate: [0_u32; 6usize],
21278        link_tx_max: [0_u32; 6usize],
21279        link_rx_max: [0_u32; 6usize],
21280        fan_speed: [0_i16; 4usize],
21281        mavtype: 0_u8,
21282        cpu_cores: [0_u8; 8usize],
21283        cpu_combined: [0_u8; 10usize],
21284        gpu_cores: [0_u8; 4usize],
21285        gpu_combined: [0_u8; 10usize],
21286        temperature_board: 0_i8,
21287        temperature_core: [0_i8; 8usize],
21288    };
21289    #[cfg(feature = "arbitrary")]
21290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21291        use arbitrary::{Arbitrary, Unstructured};
21292        let mut buf = [0u8; 1024];
21293        rng.fill_bytes(&mut buf);
21294        let mut unstructured = Unstructured::new(&buf);
21295        Self::arbitrary(&mut unstructured).unwrap_or_default()
21296    }
21297}
21298impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21299    fn default() -> Self {
21300        Self::DEFAULT.clone()
21301    }
21302}
21303impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21304    type Message = MavMessage;
21305    const ID: u32 = 390u32;
21306    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21307    const EXTRA_CRC: u8 = 156u8;
21308    const ENCODED_LEN: usize = 238usize;
21309    fn deser(
21310        _version: MavlinkVersion,
21311        __input: &[u8],
21312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21313        let avail_len = __input.len();
21314        let mut payload_buf = [0; Self::ENCODED_LEN];
21315        let mut buf = if avail_len < Self::ENCODED_LEN {
21316            payload_buf[0..avail_len].copy_from_slice(__input);
21317            Bytes::new(&payload_buf)
21318        } else {
21319            Bytes::new(__input)
21320        };
21321        let mut __struct = Self::default();
21322        __struct.time_usec = buf.get_u64_le();
21323        __struct.uptime = buf.get_u32_le();
21324        __struct.ram_usage = buf.get_u32_le();
21325        __struct.ram_total = buf.get_u32_le();
21326        for v in &mut __struct.storage_type {
21327            let val = buf.get_u32_le();
21328            *v = val;
21329        }
21330        for v in &mut __struct.storage_usage {
21331            let val = buf.get_u32_le();
21332            *v = val;
21333        }
21334        for v in &mut __struct.storage_total {
21335            let val = buf.get_u32_le();
21336            *v = val;
21337        }
21338        for v in &mut __struct.link_type {
21339            let val = buf.get_u32_le();
21340            *v = val;
21341        }
21342        for v in &mut __struct.link_tx_rate {
21343            let val = buf.get_u32_le();
21344            *v = val;
21345        }
21346        for v in &mut __struct.link_rx_rate {
21347            let val = buf.get_u32_le();
21348            *v = val;
21349        }
21350        for v in &mut __struct.link_tx_max {
21351            let val = buf.get_u32_le();
21352            *v = val;
21353        }
21354        for v in &mut __struct.link_rx_max {
21355            let val = buf.get_u32_le();
21356            *v = val;
21357        }
21358        for v in &mut __struct.fan_speed {
21359            let val = buf.get_i16_le();
21360            *v = val;
21361        }
21362        __struct.mavtype = buf.get_u8();
21363        for v in &mut __struct.cpu_cores {
21364            let val = buf.get_u8();
21365            *v = val;
21366        }
21367        for v in &mut __struct.cpu_combined {
21368            let val = buf.get_u8();
21369            *v = val;
21370        }
21371        for v in &mut __struct.gpu_cores {
21372            let val = buf.get_u8();
21373            *v = val;
21374        }
21375        for v in &mut __struct.gpu_combined {
21376            let val = buf.get_u8();
21377            *v = val;
21378        }
21379        __struct.temperature_board = buf.get_i8();
21380        for v in &mut __struct.temperature_core {
21381            let val = buf.get_i8();
21382            *v = val;
21383        }
21384        Ok(__struct)
21385    }
21386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21387        let mut __tmp = BytesMut::new(bytes);
21388        #[allow(clippy::absurd_extreme_comparisons)]
21389        #[allow(unused_comparisons)]
21390        if __tmp.remaining() < Self::ENCODED_LEN {
21391            panic!(
21392                "buffer is too small (need {} bytes, but got {})",
21393                Self::ENCODED_LEN,
21394                __tmp.remaining(),
21395            )
21396        }
21397        __tmp.put_u64_le(self.time_usec);
21398        __tmp.put_u32_le(self.uptime);
21399        __tmp.put_u32_le(self.ram_usage);
21400        __tmp.put_u32_le(self.ram_total);
21401        for val in &self.storage_type {
21402            __tmp.put_u32_le(*val);
21403        }
21404        for val in &self.storage_usage {
21405            __tmp.put_u32_le(*val);
21406        }
21407        for val in &self.storage_total {
21408            __tmp.put_u32_le(*val);
21409        }
21410        for val in &self.link_type {
21411            __tmp.put_u32_le(*val);
21412        }
21413        for val in &self.link_tx_rate {
21414            __tmp.put_u32_le(*val);
21415        }
21416        for val in &self.link_rx_rate {
21417            __tmp.put_u32_le(*val);
21418        }
21419        for val in &self.link_tx_max {
21420            __tmp.put_u32_le(*val);
21421        }
21422        for val in &self.link_rx_max {
21423            __tmp.put_u32_le(*val);
21424        }
21425        for val in &self.fan_speed {
21426            __tmp.put_i16_le(*val);
21427        }
21428        __tmp.put_u8(self.mavtype);
21429        for val in &self.cpu_cores {
21430            __tmp.put_u8(*val);
21431        }
21432        for val in &self.cpu_combined {
21433            __tmp.put_u8(*val);
21434        }
21435        for val in &self.gpu_cores {
21436            __tmp.put_u8(*val);
21437        }
21438        for val in &self.gpu_combined {
21439            __tmp.put_u8(*val);
21440        }
21441        __tmp.put_i8(self.temperature_board);
21442        for val in &self.temperature_core {
21443            __tmp.put_i8(*val);
21444        }
21445        if matches!(version, MavlinkVersion::V2) {
21446            let len = __tmp.len();
21447            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21448        } else {
21449            __tmp.len()
21450        }
21451    }
21452}
21453#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21454#[doc = ""]
21455#[doc = "ID: 12918"]
21456#[derive(Debug, Clone, PartialEq)]
21457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21459#[cfg_attr(feature = "ts", derive(TS))]
21460#[cfg_attr(feature = "ts", ts(export))]
21461pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21462    #[doc = "Status level indicating if arming is allowed."]
21463    pub status: MavOdidArmStatus,
21464    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21465    #[cfg_attr(feature = "ts", ts(type = "string"))]
21466    pub error: CharArray<50>,
21467}
21468impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21469    pub const ENCODED_LEN: usize = 51usize;
21470    pub const DEFAULT: Self = Self {
21471        status: MavOdidArmStatus::DEFAULT,
21472        error: CharArray::new([0_u8; 50usize]),
21473    };
21474    #[cfg(feature = "arbitrary")]
21475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21476        use arbitrary::{Arbitrary, Unstructured};
21477        let mut buf = [0u8; 1024];
21478        rng.fill_bytes(&mut buf);
21479        let mut unstructured = Unstructured::new(&buf);
21480        Self::arbitrary(&mut unstructured).unwrap_or_default()
21481    }
21482}
21483impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21484    fn default() -> Self {
21485        Self::DEFAULT.clone()
21486    }
21487}
21488impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21489    type Message = MavMessage;
21490    const ID: u32 = 12918u32;
21491    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21492    const EXTRA_CRC: u8 = 139u8;
21493    const ENCODED_LEN: usize = 51usize;
21494    fn deser(
21495        _version: MavlinkVersion,
21496        __input: &[u8],
21497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21498        let avail_len = __input.len();
21499        let mut payload_buf = [0; Self::ENCODED_LEN];
21500        let mut buf = if avail_len < Self::ENCODED_LEN {
21501            payload_buf[0..avail_len].copy_from_slice(__input);
21502            Bytes::new(&payload_buf)
21503        } else {
21504            Bytes::new(__input)
21505        };
21506        let mut __struct = Self::default();
21507        let tmp = buf.get_u8();
21508        __struct.status =
21509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21510                enum_type: "MavOdidArmStatus",
21511                value: tmp as u64,
21512            })?;
21513        let mut tmp = [0_u8; 50usize];
21514        for v in &mut tmp {
21515            *v = buf.get_u8();
21516        }
21517        __struct.error = CharArray::new(tmp);
21518        Ok(__struct)
21519    }
21520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21521        let mut __tmp = BytesMut::new(bytes);
21522        #[allow(clippy::absurd_extreme_comparisons)]
21523        #[allow(unused_comparisons)]
21524        if __tmp.remaining() < Self::ENCODED_LEN {
21525            panic!(
21526                "buffer is too small (need {} bytes, but got {})",
21527                Self::ENCODED_LEN,
21528                __tmp.remaining(),
21529            )
21530        }
21531        __tmp.put_u8(self.status as u8);
21532        for val in &self.error {
21533            __tmp.put_u8(*val);
21534        }
21535        if matches!(version, MavlinkVersion::V2) {
21536            let len = __tmp.len();
21537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21538        } else {
21539            __tmp.len()
21540        }
21541    }
21542}
21543#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21544#[doc = ""]
21545#[doc = "ID: 12902"]
21546#[derive(Debug, Clone, PartialEq)]
21547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21549#[cfg_attr(feature = "ts", derive(TS))]
21550#[cfg_attr(feature = "ts", ts(export))]
21551pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21552    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21553    pub timestamp: u32,
21554    #[doc = "System ID (0 for broadcast)."]
21555    pub target_system: u8,
21556    #[doc = "Component ID (0 for broadcast)."]
21557    pub target_component: u8,
21558    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21560    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21561    pub id_or_mac: [u8; 20],
21562    #[doc = "Indicates the type of authentication."]
21563    pub authentication_type: MavOdidAuthType,
21564    #[doc = "Allowed range is 0 - 15."]
21565    pub data_page: u8,
21566    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21567    pub last_page_index: u8,
21568    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21569    pub length: u8,
21570    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21572    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21573    pub authentication_data: [u8; 23],
21574}
21575impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21576    pub const ENCODED_LEN: usize = 53usize;
21577    pub const DEFAULT: Self = Self {
21578        timestamp: 0_u32,
21579        target_system: 0_u8,
21580        target_component: 0_u8,
21581        id_or_mac: [0_u8; 20usize],
21582        authentication_type: MavOdidAuthType::DEFAULT,
21583        data_page: 0_u8,
21584        last_page_index: 0_u8,
21585        length: 0_u8,
21586        authentication_data: [0_u8; 23usize],
21587    };
21588    #[cfg(feature = "arbitrary")]
21589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21590        use arbitrary::{Arbitrary, Unstructured};
21591        let mut buf = [0u8; 1024];
21592        rng.fill_bytes(&mut buf);
21593        let mut unstructured = Unstructured::new(&buf);
21594        Self::arbitrary(&mut unstructured).unwrap_or_default()
21595    }
21596}
21597impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21598    fn default() -> Self {
21599        Self::DEFAULT.clone()
21600    }
21601}
21602impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21603    type Message = MavMessage;
21604    const ID: u32 = 12902u32;
21605    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21606    const EXTRA_CRC: u8 = 140u8;
21607    const ENCODED_LEN: usize = 53usize;
21608    fn deser(
21609        _version: MavlinkVersion,
21610        __input: &[u8],
21611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21612        let avail_len = __input.len();
21613        let mut payload_buf = [0; Self::ENCODED_LEN];
21614        let mut buf = if avail_len < Self::ENCODED_LEN {
21615            payload_buf[0..avail_len].copy_from_slice(__input);
21616            Bytes::new(&payload_buf)
21617        } else {
21618            Bytes::new(__input)
21619        };
21620        let mut __struct = Self::default();
21621        __struct.timestamp = buf.get_u32_le();
21622        __struct.target_system = buf.get_u8();
21623        __struct.target_component = buf.get_u8();
21624        for v in &mut __struct.id_or_mac {
21625            let val = buf.get_u8();
21626            *v = val;
21627        }
21628        let tmp = buf.get_u8();
21629        __struct.authentication_type =
21630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21631                enum_type: "MavOdidAuthType",
21632                value: tmp as u64,
21633            })?;
21634        __struct.data_page = buf.get_u8();
21635        __struct.last_page_index = buf.get_u8();
21636        __struct.length = buf.get_u8();
21637        for v in &mut __struct.authentication_data {
21638            let val = buf.get_u8();
21639            *v = val;
21640        }
21641        Ok(__struct)
21642    }
21643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21644        let mut __tmp = BytesMut::new(bytes);
21645        #[allow(clippy::absurd_extreme_comparisons)]
21646        #[allow(unused_comparisons)]
21647        if __tmp.remaining() < Self::ENCODED_LEN {
21648            panic!(
21649                "buffer is too small (need {} bytes, but got {})",
21650                Self::ENCODED_LEN,
21651                __tmp.remaining(),
21652            )
21653        }
21654        __tmp.put_u32_le(self.timestamp);
21655        __tmp.put_u8(self.target_system);
21656        __tmp.put_u8(self.target_component);
21657        for val in &self.id_or_mac {
21658            __tmp.put_u8(*val);
21659        }
21660        __tmp.put_u8(self.authentication_type as u8);
21661        __tmp.put_u8(self.data_page);
21662        __tmp.put_u8(self.last_page_index);
21663        __tmp.put_u8(self.length);
21664        for val in &self.authentication_data {
21665            __tmp.put_u8(*val);
21666        }
21667        if matches!(version, MavlinkVersion::V2) {
21668            let len = __tmp.len();
21669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21670        } else {
21671            __tmp.len()
21672        }
21673    }
21674}
21675#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21676#[doc = ""]
21677#[doc = "ID: 12900"]
21678#[derive(Debug, Clone, PartialEq)]
21679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21681#[cfg_attr(feature = "ts", derive(TS))]
21682#[cfg_attr(feature = "ts", ts(export))]
21683pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21684    #[doc = "System ID (0 for broadcast)."]
21685    pub target_system: u8,
21686    #[doc = "Component ID (0 for broadcast)."]
21687    pub target_component: u8,
21688    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21690    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21691    pub id_or_mac: [u8; 20],
21692    #[doc = "Indicates the format for the uas_id field of this message."]
21693    pub id_type: MavOdidIdType,
21694    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21695    pub ua_type: MavOdidUaType,
21696    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21698    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21699    pub uas_id: [u8; 20],
21700}
21701impl OPEN_DRONE_ID_BASIC_ID_DATA {
21702    pub const ENCODED_LEN: usize = 44usize;
21703    pub const DEFAULT: Self = Self {
21704        target_system: 0_u8,
21705        target_component: 0_u8,
21706        id_or_mac: [0_u8; 20usize],
21707        id_type: MavOdidIdType::DEFAULT,
21708        ua_type: MavOdidUaType::DEFAULT,
21709        uas_id: [0_u8; 20usize],
21710    };
21711    #[cfg(feature = "arbitrary")]
21712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21713        use arbitrary::{Arbitrary, Unstructured};
21714        let mut buf = [0u8; 1024];
21715        rng.fill_bytes(&mut buf);
21716        let mut unstructured = Unstructured::new(&buf);
21717        Self::arbitrary(&mut unstructured).unwrap_or_default()
21718    }
21719}
21720impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21721    fn default() -> Self {
21722        Self::DEFAULT.clone()
21723    }
21724}
21725impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21726    type Message = MavMessage;
21727    const ID: u32 = 12900u32;
21728    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21729    const EXTRA_CRC: u8 = 114u8;
21730    const ENCODED_LEN: usize = 44usize;
21731    fn deser(
21732        _version: MavlinkVersion,
21733        __input: &[u8],
21734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21735        let avail_len = __input.len();
21736        let mut payload_buf = [0; Self::ENCODED_LEN];
21737        let mut buf = if avail_len < Self::ENCODED_LEN {
21738            payload_buf[0..avail_len].copy_from_slice(__input);
21739            Bytes::new(&payload_buf)
21740        } else {
21741            Bytes::new(__input)
21742        };
21743        let mut __struct = Self::default();
21744        __struct.target_system = buf.get_u8();
21745        __struct.target_component = buf.get_u8();
21746        for v in &mut __struct.id_or_mac {
21747            let val = buf.get_u8();
21748            *v = val;
21749        }
21750        let tmp = buf.get_u8();
21751        __struct.id_type =
21752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21753                enum_type: "MavOdidIdType",
21754                value: tmp as u64,
21755            })?;
21756        let tmp = buf.get_u8();
21757        __struct.ua_type =
21758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21759                enum_type: "MavOdidUaType",
21760                value: tmp as u64,
21761            })?;
21762        for v in &mut __struct.uas_id {
21763            let val = buf.get_u8();
21764            *v = val;
21765        }
21766        Ok(__struct)
21767    }
21768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21769        let mut __tmp = BytesMut::new(bytes);
21770        #[allow(clippy::absurd_extreme_comparisons)]
21771        #[allow(unused_comparisons)]
21772        if __tmp.remaining() < Self::ENCODED_LEN {
21773            panic!(
21774                "buffer is too small (need {} bytes, but got {})",
21775                Self::ENCODED_LEN,
21776                __tmp.remaining(),
21777            )
21778        }
21779        __tmp.put_u8(self.target_system);
21780        __tmp.put_u8(self.target_component);
21781        for val in &self.id_or_mac {
21782            __tmp.put_u8(*val);
21783        }
21784        __tmp.put_u8(self.id_type as u8);
21785        __tmp.put_u8(self.ua_type as u8);
21786        for val in &self.uas_id {
21787            __tmp.put_u8(*val);
21788        }
21789        if matches!(version, MavlinkVersion::V2) {
21790            let len = __tmp.len();
21791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21792        } else {
21793            __tmp.len()
21794        }
21795    }
21796}
21797#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21798#[doc = ""]
21799#[doc = "ID: 12901"]
21800#[derive(Debug, Clone, PartialEq)]
21801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21803#[cfg_attr(feature = "ts", derive(TS))]
21804#[cfg_attr(feature = "ts", ts(export))]
21805pub struct OPEN_DRONE_ID_LOCATION_DATA {
21806    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21807    pub latitude: i32,
21808    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21809    pub longitude: i32,
21810    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21811    pub altitude_barometric: f32,
21812    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21813    pub altitude_geodetic: f32,
21814    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21815    pub height: f32,
21816    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21817    pub timestamp: f32,
21818    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21819    pub direction: u16,
21820    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21821    pub speed_horizontal: u16,
21822    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21823    pub speed_vertical: i16,
21824    #[doc = "System ID (0 for broadcast)."]
21825    pub target_system: u8,
21826    #[doc = "Component ID (0 for broadcast)."]
21827    pub target_component: u8,
21828    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21831    pub id_or_mac: [u8; 20],
21832    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21833    pub status: MavOdidStatus,
21834    #[doc = "Indicates the reference point for the height field."]
21835    pub height_reference: MavOdidHeightRef,
21836    #[doc = "The accuracy of the horizontal position."]
21837    pub horizontal_accuracy: MavOdidHorAcc,
21838    #[doc = "The accuracy of the vertical position."]
21839    pub vertical_accuracy: MavOdidVerAcc,
21840    #[doc = "The accuracy of the barometric altitude."]
21841    pub barometer_accuracy: MavOdidVerAcc,
21842    #[doc = "The accuracy of the horizontal and vertical speed."]
21843    pub speed_accuracy: MavOdidSpeedAcc,
21844    #[doc = "The accuracy of the timestamps."]
21845    pub timestamp_accuracy: MavOdidTimeAcc,
21846}
21847impl OPEN_DRONE_ID_LOCATION_DATA {
21848    pub const ENCODED_LEN: usize = 59usize;
21849    pub const DEFAULT: Self = Self {
21850        latitude: 0_i32,
21851        longitude: 0_i32,
21852        altitude_barometric: 0.0_f32,
21853        altitude_geodetic: 0.0_f32,
21854        height: 0.0_f32,
21855        timestamp: 0.0_f32,
21856        direction: 0_u16,
21857        speed_horizontal: 0_u16,
21858        speed_vertical: 0_i16,
21859        target_system: 0_u8,
21860        target_component: 0_u8,
21861        id_or_mac: [0_u8; 20usize],
21862        status: MavOdidStatus::DEFAULT,
21863        height_reference: MavOdidHeightRef::DEFAULT,
21864        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21865        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21866        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21867        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21868        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21869    };
21870    #[cfg(feature = "arbitrary")]
21871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21872        use arbitrary::{Arbitrary, Unstructured};
21873        let mut buf = [0u8; 1024];
21874        rng.fill_bytes(&mut buf);
21875        let mut unstructured = Unstructured::new(&buf);
21876        Self::arbitrary(&mut unstructured).unwrap_or_default()
21877    }
21878}
21879impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21880    fn default() -> Self {
21881        Self::DEFAULT.clone()
21882    }
21883}
21884impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21885    type Message = MavMessage;
21886    const ID: u32 = 12901u32;
21887    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21888    const EXTRA_CRC: u8 = 254u8;
21889    const ENCODED_LEN: usize = 59usize;
21890    fn deser(
21891        _version: MavlinkVersion,
21892        __input: &[u8],
21893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21894        let avail_len = __input.len();
21895        let mut payload_buf = [0; Self::ENCODED_LEN];
21896        let mut buf = if avail_len < Self::ENCODED_LEN {
21897            payload_buf[0..avail_len].copy_from_slice(__input);
21898            Bytes::new(&payload_buf)
21899        } else {
21900            Bytes::new(__input)
21901        };
21902        let mut __struct = Self::default();
21903        __struct.latitude = buf.get_i32_le();
21904        __struct.longitude = buf.get_i32_le();
21905        __struct.altitude_barometric = buf.get_f32_le();
21906        __struct.altitude_geodetic = buf.get_f32_le();
21907        __struct.height = buf.get_f32_le();
21908        __struct.timestamp = buf.get_f32_le();
21909        __struct.direction = buf.get_u16_le();
21910        __struct.speed_horizontal = buf.get_u16_le();
21911        __struct.speed_vertical = buf.get_i16_le();
21912        __struct.target_system = buf.get_u8();
21913        __struct.target_component = buf.get_u8();
21914        for v in &mut __struct.id_or_mac {
21915            let val = buf.get_u8();
21916            *v = val;
21917        }
21918        let tmp = buf.get_u8();
21919        __struct.status =
21920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21921                enum_type: "MavOdidStatus",
21922                value: tmp as u64,
21923            })?;
21924        let tmp = buf.get_u8();
21925        __struct.height_reference =
21926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21927                enum_type: "MavOdidHeightRef",
21928                value: tmp as u64,
21929            })?;
21930        let tmp = buf.get_u8();
21931        __struct.horizontal_accuracy =
21932            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21933                enum_type: "MavOdidHorAcc",
21934                value: tmp as u64,
21935            })?;
21936        let tmp = buf.get_u8();
21937        __struct.vertical_accuracy =
21938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21939                enum_type: "MavOdidVerAcc",
21940                value: tmp as u64,
21941            })?;
21942        let tmp = buf.get_u8();
21943        __struct.barometer_accuracy =
21944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21945                enum_type: "MavOdidVerAcc",
21946                value: tmp as u64,
21947            })?;
21948        let tmp = buf.get_u8();
21949        __struct.speed_accuracy =
21950            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21951                enum_type: "MavOdidSpeedAcc",
21952                value: tmp as u64,
21953            })?;
21954        let tmp = buf.get_u8();
21955        __struct.timestamp_accuracy =
21956            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21957                enum_type: "MavOdidTimeAcc",
21958                value: tmp as u64,
21959            })?;
21960        Ok(__struct)
21961    }
21962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21963        let mut __tmp = BytesMut::new(bytes);
21964        #[allow(clippy::absurd_extreme_comparisons)]
21965        #[allow(unused_comparisons)]
21966        if __tmp.remaining() < Self::ENCODED_LEN {
21967            panic!(
21968                "buffer is too small (need {} bytes, but got {})",
21969                Self::ENCODED_LEN,
21970                __tmp.remaining(),
21971            )
21972        }
21973        __tmp.put_i32_le(self.latitude);
21974        __tmp.put_i32_le(self.longitude);
21975        __tmp.put_f32_le(self.altitude_barometric);
21976        __tmp.put_f32_le(self.altitude_geodetic);
21977        __tmp.put_f32_le(self.height);
21978        __tmp.put_f32_le(self.timestamp);
21979        __tmp.put_u16_le(self.direction);
21980        __tmp.put_u16_le(self.speed_horizontal);
21981        __tmp.put_i16_le(self.speed_vertical);
21982        __tmp.put_u8(self.target_system);
21983        __tmp.put_u8(self.target_component);
21984        for val in &self.id_or_mac {
21985            __tmp.put_u8(*val);
21986        }
21987        __tmp.put_u8(self.status as u8);
21988        __tmp.put_u8(self.height_reference as u8);
21989        __tmp.put_u8(self.horizontal_accuracy as u8);
21990        __tmp.put_u8(self.vertical_accuracy as u8);
21991        __tmp.put_u8(self.barometer_accuracy as u8);
21992        __tmp.put_u8(self.speed_accuracy as u8);
21993        __tmp.put_u8(self.timestamp_accuracy as u8);
21994        if matches!(version, MavlinkVersion::V2) {
21995            let len = __tmp.len();
21996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21997        } else {
21998            __tmp.len()
21999        }
22000    }
22001}
22002#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22003#[doc = ""]
22004#[doc = "ID: 12915"]
22005#[derive(Debug, Clone, PartialEq)]
22006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22008#[cfg_attr(feature = "ts", derive(TS))]
22009#[cfg_attr(feature = "ts", ts(export))]
22010pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22011    #[doc = "System ID (0 for broadcast)."]
22012    pub target_system: u8,
22013    #[doc = "Component ID (0 for broadcast)."]
22014    pub target_component: u8,
22015    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22016    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22017    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22018    pub id_or_mac: [u8; 20],
22019    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22020    pub single_message_size: u8,
22021    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22022    pub msg_pack_size: u8,
22023    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22025    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22026    pub messages: [u8; 225],
22027}
22028impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22029    pub const ENCODED_LEN: usize = 249usize;
22030    pub const DEFAULT: Self = Self {
22031        target_system: 0_u8,
22032        target_component: 0_u8,
22033        id_or_mac: [0_u8; 20usize],
22034        single_message_size: 0_u8,
22035        msg_pack_size: 0_u8,
22036        messages: [0_u8; 225usize],
22037    };
22038    #[cfg(feature = "arbitrary")]
22039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22040        use arbitrary::{Arbitrary, Unstructured};
22041        let mut buf = [0u8; 1024];
22042        rng.fill_bytes(&mut buf);
22043        let mut unstructured = Unstructured::new(&buf);
22044        Self::arbitrary(&mut unstructured).unwrap_or_default()
22045    }
22046}
22047impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22048    fn default() -> Self {
22049        Self::DEFAULT.clone()
22050    }
22051}
22052impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22053    type Message = MavMessage;
22054    const ID: u32 = 12915u32;
22055    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22056    const EXTRA_CRC: u8 = 94u8;
22057    const ENCODED_LEN: usize = 249usize;
22058    fn deser(
22059        _version: MavlinkVersion,
22060        __input: &[u8],
22061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22062        let avail_len = __input.len();
22063        let mut payload_buf = [0; Self::ENCODED_LEN];
22064        let mut buf = if avail_len < Self::ENCODED_LEN {
22065            payload_buf[0..avail_len].copy_from_slice(__input);
22066            Bytes::new(&payload_buf)
22067        } else {
22068            Bytes::new(__input)
22069        };
22070        let mut __struct = Self::default();
22071        __struct.target_system = buf.get_u8();
22072        __struct.target_component = buf.get_u8();
22073        for v in &mut __struct.id_or_mac {
22074            let val = buf.get_u8();
22075            *v = val;
22076        }
22077        __struct.single_message_size = buf.get_u8();
22078        __struct.msg_pack_size = buf.get_u8();
22079        for v in &mut __struct.messages {
22080            let val = buf.get_u8();
22081            *v = val;
22082        }
22083        Ok(__struct)
22084    }
22085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22086        let mut __tmp = BytesMut::new(bytes);
22087        #[allow(clippy::absurd_extreme_comparisons)]
22088        #[allow(unused_comparisons)]
22089        if __tmp.remaining() < Self::ENCODED_LEN {
22090            panic!(
22091                "buffer is too small (need {} bytes, but got {})",
22092                Self::ENCODED_LEN,
22093                __tmp.remaining(),
22094            )
22095        }
22096        __tmp.put_u8(self.target_system);
22097        __tmp.put_u8(self.target_component);
22098        for val in &self.id_or_mac {
22099            __tmp.put_u8(*val);
22100        }
22101        __tmp.put_u8(self.single_message_size);
22102        __tmp.put_u8(self.msg_pack_size);
22103        for val in &self.messages {
22104            __tmp.put_u8(*val);
22105        }
22106        if matches!(version, MavlinkVersion::V2) {
22107            let len = __tmp.len();
22108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22109        } else {
22110            __tmp.len()
22111        }
22112    }
22113}
22114#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22115#[doc = ""]
22116#[doc = "ID: 12905"]
22117#[derive(Debug, Clone, PartialEq)]
22118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22120#[cfg_attr(feature = "ts", derive(TS))]
22121#[cfg_attr(feature = "ts", ts(export))]
22122pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22123    #[doc = "System ID (0 for broadcast)."]
22124    pub target_system: u8,
22125    #[doc = "Component ID (0 for broadcast)."]
22126    pub target_component: u8,
22127    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22129    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22130    pub id_or_mac: [u8; 20],
22131    #[doc = "Indicates the type of the operator_id field."]
22132    pub operator_id_type: MavOdidOperatorIdType,
22133    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22134    #[cfg_attr(feature = "ts", ts(type = "string"))]
22135    pub operator_id: CharArray<20>,
22136}
22137impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22138    pub const ENCODED_LEN: usize = 43usize;
22139    pub const DEFAULT: Self = Self {
22140        target_system: 0_u8,
22141        target_component: 0_u8,
22142        id_or_mac: [0_u8; 20usize],
22143        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22144        operator_id: CharArray::new([0_u8; 20usize]),
22145    };
22146    #[cfg(feature = "arbitrary")]
22147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22148        use arbitrary::{Arbitrary, Unstructured};
22149        let mut buf = [0u8; 1024];
22150        rng.fill_bytes(&mut buf);
22151        let mut unstructured = Unstructured::new(&buf);
22152        Self::arbitrary(&mut unstructured).unwrap_or_default()
22153    }
22154}
22155impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22156    fn default() -> Self {
22157        Self::DEFAULT.clone()
22158    }
22159}
22160impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22161    type Message = MavMessage;
22162    const ID: u32 = 12905u32;
22163    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22164    const EXTRA_CRC: u8 = 49u8;
22165    const ENCODED_LEN: usize = 43usize;
22166    fn deser(
22167        _version: MavlinkVersion,
22168        __input: &[u8],
22169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22170        let avail_len = __input.len();
22171        let mut payload_buf = [0; Self::ENCODED_LEN];
22172        let mut buf = if avail_len < Self::ENCODED_LEN {
22173            payload_buf[0..avail_len].copy_from_slice(__input);
22174            Bytes::new(&payload_buf)
22175        } else {
22176            Bytes::new(__input)
22177        };
22178        let mut __struct = Self::default();
22179        __struct.target_system = buf.get_u8();
22180        __struct.target_component = buf.get_u8();
22181        for v in &mut __struct.id_or_mac {
22182            let val = buf.get_u8();
22183            *v = val;
22184        }
22185        let tmp = buf.get_u8();
22186        __struct.operator_id_type =
22187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22188                enum_type: "MavOdidOperatorIdType",
22189                value: tmp as u64,
22190            })?;
22191        let mut tmp = [0_u8; 20usize];
22192        for v in &mut tmp {
22193            *v = buf.get_u8();
22194        }
22195        __struct.operator_id = CharArray::new(tmp);
22196        Ok(__struct)
22197    }
22198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22199        let mut __tmp = BytesMut::new(bytes);
22200        #[allow(clippy::absurd_extreme_comparisons)]
22201        #[allow(unused_comparisons)]
22202        if __tmp.remaining() < Self::ENCODED_LEN {
22203            panic!(
22204                "buffer is too small (need {} bytes, but got {})",
22205                Self::ENCODED_LEN,
22206                __tmp.remaining(),
22207            )
22208        }
22209        __tmp.put_u8(self.target_system);
22210        __tmp.put_u8(self.target_component);
22211        for val in &self.id_or_mac {
22212            __tmp.put_u8(*val);
22213        }
22214        __tmp.put_u8(self.operator_id_type as u8);
22215        for val in &self.operator_id {
22216            __tmp.put_u8(*val);
22217        }
22218        if matches!(version, MavlinkVersion::V2) {
22219            let len = __tmp.len();
22220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22221        } else {
22222            __tmp.len()
22223        }
22224    }
22225}
22226#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22227#[doc = ""]
22228#[doc = "ID: 12903"]
22229#[derive(Debug, Clone, PartialEq)]
22230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22232#[cfg_attr(feature = "ts", derive(TS))]
22233#[cfg_attr(feature = "ts", ts(export))]
22234pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22235    #[doc = "System ID (0 for broadcast)."]
22236    pub target_system: u8,
22237    #[doc = "Component ID (0 for broadcast)."]
22238    pub target_component: u8,
22239    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22241    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22242    pub id_or_mac: [u8; 20],
22243    #[doc = "Indicates the type of the description field."]
22244    pub description_type: MavOdidDescType,
22245    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22246    #[cfg_attr(feature = "ts", ts(type = "string"))]
22247    pub description: CharArray<23>,
22248}
22249impl OPEN_DRONE_ID_SELF_ID_DATA {
22250    pub const ENCODED_LEN: usize = 46usize;
22251    pub const DEFAULT: Self = Self {
22252        target_system: 0_u8,
22253        target_component: 0_u8,
22254        id_or_mac: [0_u8; 20usize],
22255        description_type: MavOdidDescType::DEFAULT,
22256        description: CharArray::new([0_u8; 23usize]),
22257    };
22258    #[cfg(feature = "arbitrary")]
22259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22260        use arbitrary::{Arbitrary, Unstructured};
22261        let mut buf = [0u8; 1024];
22262        rng.fill_bytes(&mut buf);
22263        let mut unstructured = Unstructured::new(&buf);
22264        Self::arbitrary(&mut unstructured).unwrap_or_default()
22265    }
22266}
22267impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22268    fn default() -> Self {
22269        Self::DEFAULT.clone()
22270    }
22271}
22272impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22273    type Message = MavMessage;
22274    const ID: u32 = 12903u32;
22275    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22276    const EXTRA_CRC: u8 = 249u8;
22277    const ENCODED_LEN: usize = 46usize;
22278    fn deser(
22279        _version: MavlinkVersion,
22280        __input: &[u8],
22281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22282        let avail_len = __input.len();
22283        let mut payload_buf = [0; Self::ENCODED_LEN];
22284        let mut buf = if avail_len < Self::ENCODED_LEN {
22285            payload_buf[0..avail_len].copy_from_slice(__input);
22286            Bytes::new(&payload_buf)
22287        } else {
22288            Bytes::new(__input)
22289        };
22290        let mut __struct = Self::default();
22291        __struct.target_system = buf.get_u8();
22292        __struct.target_component = buf.get_u8();
22293        for v in &mut __struct.id_or_mac {
22294            let val = buf.get_u8();
22295            *v = val;
22296        }
22297        let tmp = buf.get_u8();
22298        __struct.description_type =
22299            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22300                enum_type: "MavOdidDescType",
22301                value: tmp as u64,
22302            })?;
22303        let mut tmp = [0_u8; 23usize];
22304        for v in &mut tmp {
22305            *v = buf.get_u8();
22306        }
22307        __struct.description = CharArray::new(tmp);
22308        Ok(__struct)
22309    }
22310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22311        let mut __tmp = BytesMut::new(bytes);
22312        #[allow(clippy::absurd_extreme_comparisons)]
22313        #[allow(unused_comparisons)]
22314        if __tmp.remaining() < Self::ENCODED_LEN {
22315            panic!(
22316                "buffer is too small (need {} bytes, but got {})",
22317                Self::ENCODED_LEN,
22318                __tmp.remaining(),
22319            )
22320        }
22321        __tmp.put_u8(self.target_system);
22322        __tmp.put_u8(self.target_component);
22323        for val in &self.id_or_mac {
22324            __tmp.put_u8(*val);
22325        }
22326        __tmp.put_u8(self.description_type as u8);
22327        for val in &self.description {
22328            __tmp.put_u8(*val);
22329        }
22330        if matches!(version, MavlinkVersion::V2) {
22331            let len = __tmp.len();
22332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22333        } else {
22334            __tmp.len()
22335        }
22336    }
22337}
22338#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22339#[doc = ""]
22340#[doc = "ID: 12904"]
22341#[derive(Debug, Clone, PartialEq)]
22342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22344#[cfg_attr(feature = "ts", derive(TS))]
22345#[cfg_attr(feature = "ts", ts(export))]
22346pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22347    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22348    pub operator_latitude: i32,
22349    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22350    pub operator_longitude: i32,
22351    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22352    pub area_ceiling: f32,
22353    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22354    pub area_floor: f32,
22355    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22356    pub operator_altitude_geo: f32,
22357    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22358    pub timestamp: u32,
22359    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22360    pub area_count: u16,
22361    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22362    pub area_radius: u16,
22363    #[doc = "System ID (0 for broadcast)."]
22364    pub target_system: u8,
22365    #[doc = "Component ID (0 for broadcast)."]
22366    pub target_component: u8,
22367    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22370    pub id_or_mac: [u8; 20],
22371    #[doc = "Specifies the operator location type."]
22372    pub operator_location_type: MavOdidOperatorLocationType,
22373    #[doc = "Specifies the classification type of the UA."]
22374    pub classification_type: MavOdidClassificationType,
22375    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22376    pub category_eu: MavOdidCategoryEu,
22377    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22378    pub class_eu: MavOdidClassEu,
22379}
22380impl OPEN_DRONE_ID_SYSTEM_DATA {
22381    pub const ENCODED_LEN: usize = 54usize;
22382    pub const DEFAULT: Self = Self {
22383        operator_latitude: 0_i32,
22384        operator_longitude: 0_i32,
22385        area_ceiling: 0.0_f32,
22386        area_floor: 0.0_f32,
22387        operator_altitude_geo: 0.0_f32,
22388        timestamp: 0_u32,
22389        area_count: 0_u16,
22390        area_radius: 0_u16,
22391        target_system: 0_u8,
22392        target_component: 0_u8,
22393        id_or_mac: [0_u8; 20usize],
22394        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22395        classification_type: MavOdidClassificationType::DEFAULT,
22396        category_eu: MavOdidCategoryEu::DEFAULT,
22397        class_eu: MavOdidClassEu::DEFAULT,
22398    };
22399    #[cfg(feature = "arbitrary")]
22400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22401        use arbitrary::{Arbitrary, Unstructured};
22402        let mut buf = [0u8; 1024];
22403        rng.fill_bytes(&mut buf);
22404        let mut unstructured = Unstructured::new(&buf);
22405        Self::arbitrary(&mut unstructured).unwrap_or_default()
22406    }
22407}
22408impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22409    fn default() -> Self {
22410        Self::DEFAULT.clone()
22411    }
22412}
22413impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22414    type Message = MavMessage;
22415    const ID: u32 = 12904u32;
22416    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22417    const EXTRA_CRC: u8 = 77u8;
22418    const ENCODED_LEN: usize = 54usize;
22419    fn deser(
22420        _version: MavlinkVersion,
22421        __input: &[u8],
22422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22423        let avail_len = __input.len();
22424        let mut payload_buf = [0; Self::ENCODED_LEN];
22425        let mut buf = if avail_len < Self::ENCODED_LEN {
22426            payload_buf[0..avail_len].copy_from_slice(__input);
22427            Bytes::new(&payload_buf)
22428        } else {
22429            Bytes::new(__input)
22430        };
22431        let mut __struct = Self::default();
22432        __struct.operator_latitude = buf.get_i32_le();
22433        __struct.operator_longitude = buf.get_i32_le();
22434        __struct.area_ceiling = buf.get_f32_le();
22435        __struct.area_floor = buf.get_f32_le();
22436        __struct.operator_altitude_geo = buf.get_f32_le();
22437        __struct.timestamp = buf.get_u32_le();
22438        __struct.area_count = buf.get_u16_le();
22439        __struct.area_radius = buf.get_u16_le();
22440        __struct.target_system = buf.get_u8();
22441        __struct.target_component = buf.get_u8();
22442        for v in &mut __struct.id_or_mac {
22443            let val = buf.get_u8();
22444            *v = val;
22445        }
22446        let tmp = buf.get_u8();
22447        __struct.operator_location_type =
22448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22449                enum_type: "MavOdidOperatorLocationType",
22450                value: tmp as u64,
22451            })?;
22452        let tmp = buf.get_u8();
22453        __struct.classification_type =
22454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22455                enum_type: "MavOdidClassificationType",
22456                value: tmp as u64,
22457            })?;
22458        let tmp = buf.get_u8();
22459        __struct.category_eu =
22460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22461                enum_type: "MavOdidCategoryEu",
22462                value: tmp as u64,
22463            })?;
22464        let tmp = buf.get_u8();
22465        __struct.class_eu =
22466            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22467                enum_type: "MavOdidClassEu",
22468                value: tmp as u64,
22469            })?;
22470        Ok(__struct)
22471    }
22472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22473        let mut __tmp = BytesMut::new(bytes);
22474        #[allow(clippy::absurd_extreme_comparisons)]
22475        #[allow(unused_comparisons)]
22476        if __tmp.remaining() < Self::ENCODED_LEN {
22477            panic!(
22478                "buffer is too small (need {} bytes, but got {})",
22479                Self::ENCODED_LEN,
22480                __tmp.remaining(),
22481            )
22482        }
22483        __tmp.put_i32_le(self.operator_latitude);
22484        __tmp.put_i32_le(self.operator_longitude);
22485        __tmp.put_f32_le(self.area_ceiling);
22486        __tmp.put_f32_le(self.area_floor);
22487        __tmp.put_f32_le(self.operator_altitude_geo);
22488        __tmp.put_u32_le(self.timestamp);
22489        __tmp.put_u16_le(self.area_count);
22490        __tmp.put_u16_le(self.area_radius);
22491        __tmp.put_u8(self.target_system);
22492        __tmp.put_u8(self.target_component);
22493        for val in &self.id_or_mac {
22494            __tmp.put_u8(*val);
22495        }
22496        __tmp.put_u8(self.operator_location_type as u8);
22497        __tmp.put_u8(self.classification_type as u8);
22498        __tmp.put_u8(self.category_eu as u8);
22499        __tmp.put_u8(self.class_eu as u8);
22500        if matches!(version, MavlinkVersion::V2) {
22501            let len = __tmp.len();
22502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22503        } else {
22504            __tmp.len()
22505        }
22506    }
22507}
22508#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22509#[doc = ""]
22510#[doc = "ID: 12919"]
22511#[derive(Debug, Clone, PartialEq)]
22512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22514#[cfg_attr(feature = "ts", derive(TS))]
22515#[cfg_attr(feature = "ts", ts(export))]
22516pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22517    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22518    pub operator_latitude: i32,
22519    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22520    pub operator_longitude: i32,
22521    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22522    pub operator_altitude_geo: f32,
22523    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22524    pub timestamp: u32,
22525    #[doc = "System ID (0 for broadcast)."]
22526    pub target_system: u8,
22527    #[doc = "Component ID (0 for broadcast)."]
22528    pub target_component: u8,
22529}
22530impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22531    pub const ENCODED_LEN: usize = 18usize;
22532    pub const DEFAULT: Self = Self {
22533        operator_latitude: 0_i32,
22534        operator_longitude: 0_i32,
22535        operator_altitude_geo: 0.0_f32,
22536        timestamp: 0_u32,
22537        target_system: 0_u8,
22538        target_component: 0_u8,
22539    };
22540    #[cfg(feature = "arbitrary")]
22541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22542        use arbitrary::{Arbitrary, Unstructured};
22543        let mut buf = [0u8; 1024];
22544        rng.fill_bytes(&mut buf);
22545        let mut unstructured = Unstructured::new(&buf);
22546        Self::arbitrary(&mut unstructured).unwrap_or_default()
22547    }
22548}
22549impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22550    fn default() -> Self {
22551        Self::DEFAULT.clone()
22552    }
22553}
22554impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22555    type Message = MavMessage;
22556    const ID: u32 = 12919u32;
22557    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22558    const EXTRA_CRC: u8 = 7u8;
22559    const ENCODED_LEN: usize = 18usize;
22560    fn deser(
22561        _version: MavlinkVersion,
22562        __input: &[u8],
22563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22564        let avail_len = __input.len();
22565        let mut payload_buf = [0; Self::ENCODED_LEN];
22566        let mut buf = if avail_len < Self::ENCODED_LEN {
22567            payload_buf[0..avail_len].copy_from_slice(__input);
22568            Bytes::new(&payload_buf)
22569        } else {
22570            Bytes::new(__input)
22571        };
22572        let mut __struct = Self::default();
22573        __struct.operator_latitude = buf.get_i32_le();
22574        __struct.operator_longitude = buf.get_i32_le();
22575        __struct.operator_altitude_geo = buf.get_f32_le();
22576        __struct.timestamp = buf.get_u32_le();
22577        __struct.target_system = buf.get_u8();
22578        __struct.target_component = buf.get_u8();
22579        Ok(__struct)
22580    }
22581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22582        let mut __tmp = BytesMut::new(bytes);
22583        #[allow(clippy::absurd_extreme_comparisons)]
22584        #[allow(unused_comparisons)]
22585        if __tmp.remaining() < Self::ENCODED_LEN {
22586            panic!(
22587                "buffer is too small (need {} bytes, but got {})",
22588                Self::ENCODED_LEN,
22589                __tmp.remaining(),
22590            )
22591        }
22592        __tmp.put_i32_le(self.operator_latitude);
22593        __tmp.put_i32_le(self.operator_longitude);
22594        __tmp.put_f32_le(self.operator_altitude_geo);
22595        __tmp.put_u32_le(self.timestamp);
22596        __tmp.put_u8(self.target_system);
22597        __tmp.put_u8(self.target_component);
22598        if matches!(version, MavlinkVersion::V2) {
22599            let len = __tmp.len();
22600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22601        } else {
22602            __tmp.len()
22603        }
22604    }
22605}
22606#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22607#[doc = ""]
22608#[doc = "ID: 100"]
22609#[derive(Debug, Clone, PartialEq)]
22610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22612#[cfg_attr(feature = "ts", derive(TS))]
22613#[cfg_attr(feature = "ts", ts(export))]
22614pub struct OPTICAL_FLOW_DATA {
22615    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22616    pub time_usec: u64,
22617    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22618    pub flow_comp_m_x: f32,
22619    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22620    pub flow_comp_m_y: f32,
22621    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22622    pub ground_distance: f32,
22623    #[doc = "Flow in x-sensor direction"]
22624    pub flow_x: i16,
22625    #[doc = "Flow in y-sensor direction"]
22626    pub flow_y: i16,
22627    #[doc = "Sensor ID"]
22628    pub sensor_id: u8,
22629    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22630    pub quality: u8,
22631    #[doc = "Flow rate about X axis"]
22632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22633    pub flow_rate_x: f32,
22634    #[doc = "Flow rate about Y axis"]
22635    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22636    pub flow_rate_y: f32,
22637}
22638impl OPTICAL_FLOW_DATA {
22639    pub const ENCODED_LEN: usize = 34usize;
22640    pub const DEFAULT: Self = Self {
22641        time_usec: 0_u64,
22642        flow_comp_m_x: 0.0_f32,
22643        flow_comp_m_y: 0.0_f32,
22644        ground_distance: 0.0_f32,
22645        flow_x: 0_i16,
22646        flow_y: 0_i16,
22647        sensor_id: 0_u8,
22648        quality: 0_u8,
22649        flow_rate_x: 0.0_f32,
22650        flow_rate_y: 0.0_f32,
22651    };
22652    #[cfg(feature = "arbitrary")]
22653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22654        use arbitrary::{Arbitrary, Unstructured};
22655        let mut buf = [0u8; 1024];
22656        rng.fill_bytes(&mut buf);
22657        let mut unstructured = Unstructured::new(&buf);
22658        Self::arbitrary(&mut unstructured).unwrap_or_default()
22659    }
22660}
22661impl Default for OPTICAL_FLOW_DATA {
22662    fn default() -> Self {
22663        Self::DEFAULT.clone()
22664    }
22665}
22666impl MessageData for OPTICAL_FLOW_DATA {
22667    type Message = MavMessage;
22668    const ID: u32 = 100u32;
22669    const NAME: &'static str = "OPTICAL_FLOW";
22670    const EXTRA_CRC: u8 = 175u8;
22671    const ENCODED_LEN: usize = 34usize;
22672    fn deser(
22673        _version: MavlinkVersion,
22674        __input: &[u8],
22675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22676        let avail_len = __input.len();
22677        let mut payload_buf = [0; Self::ENCODED_LEN];
22678        let mut buf = if avail_len < Self::ENCODED_LEN {
22679            payload_buf[0..avail_len].copy_from_slice(__input);
22680            Bytes::new(&payload_buf)
22681        } else {
22682            Bytes::new(__input)
22683        };
22684        let mut __struct = Self::default();
22685        __struct.time_usec = buf.get_u64_le();
22686        __struct.flow_comp_m_x = buf.get_f32_le();
22687        __struct.flow_comp_m_y = buf.get_f32_le();
22688        __struct.ground_distance = buf.get_f32_le();
22689        __struct.flow_x = buf.get_i16_le();
22690        __struct.flow_y = buf.get_i16_le();
22691        __struct.sensor_id = buf.get_u8();
22692        __struct.quality = buf.get_u8();
22693        __struct.flow_rate_x = buf.get_f32_le();
22694        __struct.flow_rate_y = buf.get_f32_le();
22695        Ok(__struct)
22696    }
22697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22698        let mut __tmp = BytesMut::new(bytes);
22699        #[allow(clippy::absurd_extreme_comparisons)]
22700        #[allow(unused_comparisons)]
22701        if __tmp.remaining() < Self::ENCODED_LEN {
22702            panic!(
22703                "buffer is too small (need {} bytes, but got {})",
22704                Self::ENCODED_LEN,
22705                __tmp.remaining(),
22706            )
22707        }
22708        __tmp.put_u64_le(self.time_usec);
22709        __tmp.put_f32_le(self.flow_comp_m_x);
22710        __tmp.put_f32_le(self.flow_comp_m_y);
22711        __tmp.put_f32_le(self.ground_distance);
22712        __tmp.put_i16_le(self.flow_x);
22713        __tmp.put_i16_le(self.flow_y);
22714        __tmp.put_u8(self.sensor_id);
22715        __tmp.put_u8(self.quality);
22716        if matches!(version, MavlinkVersion::V2) {
22717            __tmp.put_f32_le(self.flow_rate_x);
22718            __tmp.put_f32_le(self.flow_rate_y);
22719            let len = __tmp.len();
22720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22721        } else {
22722            __tmp.len()
22723        }
22724    }
22725}
22726#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22727#[doc = ""]
22728#[doc = "ID: 106"]
22729#[derive(Debug, Clone, PartialEq)]
22730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22732#[cfg_attr(feature = "ts", derive(TS))]
22733#[cfg_attr(feature = "ts", ts(export))]
22734pub struct OPTICAL_FLOW_RAD_DATA {
22735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22736    pub time_usec: u64,
22737    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22738    pub integration_time_us: u32,
22739    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22740    pub integrated_x: f32,
22741    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22742    pub integrated_y: f32,
22743    #[doc = "RH rotation around X axis"]
22744    pub integrated_xgyro: f32,
22745    #[doc = "RH rotation around Y axis"]
22746    pub integrated_ygyro: f32,
22747    #[doc = "RH rotation around Z axis"]
22748    pub integrated_zgyro: f32,
22749    #[doc = "Time since the distance was sampled."]
22750    pub time_delta_distance_us: u32,
22751    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22752    pub distance: f32,
22753    #[doc = "Temperature"]
22754    pub temperature: i16,
22755    #[doc = "Sensor ID"]
22756    pub sensor_id: u8,
22757    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22758    pub quality: u8,
22759}
22760impl OPTICAL_FLOW_RAD_DATA {
22761    pub const ENCODED_LEN: usize = 44usize;
22762    pub const DEFAULT: Self = Self {
22763        time_usec: 0_u64,
22764        integration_time_us: 0_u32,
22765        integrated_x: 0.0_f32,
22766        integrated_y: 0.0_f32,
22767        integrated_xgyro: 0.0_f32,
22768        integrated_ygyro: 0.0_f32,
22769        integrated_zgyro: 0.0_f32,
22770        time_delta_distance_us: 0_u32,
22771        distance: 0.0_f32,
22772        temperature: 0_i16,
22773        sensor_id: 0_u8,
22774        quality: 0_u8,
22775    };
22776    #[cfg(feature = "arbitrary")]
22777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22778        use arbitrary::{Arbitrary, Unstructured};
22779        let mut buf = [0u8; 1024];
22780        rng.fill_bytes(&mut buf);
22781        let mut unstructured = Unstructured::new(&buf);
22782        Self::arbitrary(&mut unstructured).unwrap_or_default()
22783    }
22784}
22785impl Default for OPTICAL_FLOW_RAD_DATA {
22786    fn default() -> Self {
22787        Self::DEFAULT.clone()
22788    }
22789}
22790impl MessageData for OPTICAL_FLOW_RAD_DATA {
22791    type Message = MavMessage;
22792    const ID: u32 = 106u32;
22793    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22794    const EXTRA_CRC: u8 = 138u8;
22795    const ENCODED_LEN: usize = 44usize;
22796    fn deser(
22797        _version: MavlinkVersion,
22798        __input: &[u8],
22799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22800        let avail_len = __input.len();
22801        let mut payload_buf = [0; Self::ENCODED_LEN];
22802        let mut buf = if avail_len < Self::ENCODED_LEN {
22803            payload_buf[0..avail_len].copy_from_slice(__input);
22804            Bytes::new(&payload_buf)
22805        } else {
22806            Bytes::new(__input)
22807        };
22808        let mut __struct = Self::default();
22809        __struct.time_usec = buf.get_u64_le();
22810        __struct.integration_time_us = buf.get_u32_le();
22811        __struct.integrated_x = buf.get_f32_le();
22812        __struct.integrated_y = buf.get_f32_le();
22813        __struct.integrated_xgyro = buf.get_f32_le();
22814        __struct.integrated_ygyro = buf.get_f32_le();
22815        __struct.integrated_zgyro = buf.get_f32_le();
22816        __struct.time_delta_distance_us = buf.get_u32_le();
22817        __struct.distance = buf.get_f32_le();
22818        __struct.temperature = buf.get_i16_le();
22819        __struct.sensor_id = buf.get_u8();
22820        __struct.quality = buf.get_u8();
22821        Ok(__struct)
22822    }
22823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22824        let mut __tmp = BytesMut::new(bytes);
22825        #[allow(clippy::absurd_extreme_comparisons)]
22826        #[allow(unused_comparisons)]
22827        if __tmp.remaining() < Self::ENCODED_LEN {
22828            panic!(
22829                "buffer is too small (need {} bytes, but got {})",
22830                Self::ENCODED_LEN,
22831                __tmp.remaining(),
22832            )
22833        }
22834        __tmp.put_u64_le(self.time_usec);
22835        __tmp.put_u32_le(self.integration_time_us);
22836        __tmp.put_f32_le(self.integrated_x);
22837        __tmp.put_f32_le(self.integrated_y);
22838        __tmp.put_f32_le(self.integrated_xgyro);
22839        __tmp.put_f32_le(self.integrated_ygyro);
22840        __tmp.put_f32_le(self.integrated_zgyro);
22841        __tmp.put_u32_le(self.time_delta_distance_us);
22842        __tmp.put_f32_le(self.distance);
22843        __tmp.put_i16_le(self.temperature);
22844        __tmp.put_u8(self.sensor_id);
22845        __tmp.put_u8(self.quality);
22846        if matches!(version, MavlinkVersion::V2) {
22847            let len = __tmp.len();
22848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22849        } else {
22850            __tmp.len()
22851        }
22852    }
22853}
22854#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22855#[doc = ""]
22856#[doc = "ID: 360"]
22857#[derive(Debug, Clone, PartialEq)]
22858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22860#[cfg_attr(feature = "ts", derive(TS))]
22861#[cfg_attr(feature = "ts", ts(export))]
22862pub struct ORBIT_EXECUTION_STATUS_DATA {
22863    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22864    pub time_usec: u64,
22865    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22866    pub radius: f32,
22867    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22868    pub x: i32,
22869    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22870    pub y: i32,
22871    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22872    pub z: f32,
22873    #[doc = "The coordinate system of the fields: x, y, z."]
22874    pub frame: MavFrame,
22875}
22876impl ORBIT_EXECUTION_STATUS_DATA {
22877    pub const ENCODED_LEN: usize = 25usize;
22878    pub const DEFAULT: Self = Self {
22879        time_usec: 0_u64,
22880        radius: 0.0_f32,
22881        x: 0_i32,
22882        y: 0_i32,
22883        z: 0.0_f32,
22884        frame: MavFrame::DEFAULT,
22885    };
22886    #[cfg(feature = "arbitrary")]
22887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22888        use arbitrary::{Arbitrary, Unstructured};
22889        let mut buf = [0u8; 1024];
22890        rng.fill_bytes(&mut buf);
22891        let mut unstructured = Unstructured::new(&buf);
22892        Self::arbitrary(&mut unstructured).unwrap_or_default()
22893    }
22894}
22895impl Default for ORBIT_EXECUTION_STATUS_DATA {
22896    fn default() -> Self {
22897        Self::DEFAULT.clone()
22898    }
22899}
22900impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22901    type Message = MavMessage;
22902    const ID: u32 = 360u32;
22903    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22904    const EXTRA_CRC: u8 = 11u8;
22905    const ENCODED_LEN: usize = 25usize;
22906    fn deser(
22907        _version: MavlinkVersion,
22908        __input: &[u8],
22909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22910        let avail_len = __input.len();
22911        let mut payload_buf = [0; Self::ENCODED_LEN];
22912        let mut buf = if avail_len < Self::ENCODED_LEN {
22913            payload_buf[0..avail_len].copy_from_slice(__input);
22914            Bytes::new(&payload_buf)
22915        } else {
22916            Bytes::new(__input)
22917        };
22918        let mut __struct = Self::default();
22919        __struct.time_usec = buf.get_u64_le();
22920        __struct.radius = buf.get_f32_le();
22921        __struct.x = buf.get_i32_le();
22922        __struct.y = buf.get_i32_le();
22923        __struct.z = buf.get_f32_le();
22924        let tmp = buf.get_u8();
22925        __struct.frame =
22926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22927                enum_type: "MavFrame",
22928                value: tmp as u64,
22929            })?;
22930        Ok(__struct)
22931    }
22932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22933        let mut __tmp = BytesMut::new(bytes);
22934        #[allow(clippy::absurd_extreme_comparisons)]
22935        #[allow(unused_comparisons)]
22936        if __tmp.remaining() < Self::ENCODED_LEN {
22937            panic!(
22938                "buffer is too small (need {} bytes, but got {})",
22939                Self::ENCODED_LEN,
22940                __tmp.remaining(),
22941            )
22942        }
22943        __tmp.put_u64_le(self.time_usec);
22944        __tmp.put_f32_le(self.radius);
22945        __tmp.put_i32_le(self.x);
22946        __tmp.put_i32_le(self.y);
22947        __tmp.put_f32_le(self.z);
22948        __tmp.put_u8(self.frame as u8);
22949        if matches!(version, MavlinkVersion::V2) {
22950            let len = __tmp.len();
22951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22952        } else {
22953            __tmp.len()
22954        }
22955    }
22956}
22957#[doc = "Response from a PARAM_EXT_SET message."]
22958#[doc = ""]
22959#[doc = "ID: 324"]
22960#[derive(Debug, Clone, PartialEq)]
22961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22963#[cfg_attr(feature = "ts", derive(TS))]
22964#[cfg_attr(feature = "ts", ts(export))]
22965pub struct PARAM_EXT_ACK_DATA {
22966    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22967    #[cfg_attr(feature = "ts", ts(type = "string"))]
22968    pub param_id: CharArray<16>,
22969    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22970    #[cfg_attr(feature = "ts", ts(type = "string"))]
22971    pub param_value: CharArray<128>,
22972    #[doc = "Parameter type."]
22973    pub param_type: MavParamExtType,
22974    #[doc = "Result code."]
22975    pub param_result: ParamAck,
22976}
22977impl PARAM_EXT_ACK_DATA {
22978    pub const ENCODED_LEN: usize = 146usize;
22979    pub const DEFAULT: Self = Self {
22980        param_id: CharArray::new([0_u8; 16usize]),
22981        param_value: CharArray::new([0_u8; 128usize]),
22982        param_type: MavParamExtType::DEFAULT,
22983        param_result: ParamAck::DEFAULT,
22984    };
22985    #[cfg(feature = "arbitrary")]
22986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22987        use arbitrary::{Arbitrary, Unstructured};
22988        let mut buf = [0u8; 1024];
22989        rng.fill_bytes(&mut buf);
22990        let mut unstructured = Unstructured::new(&buf);
22991        Self::arbitrary(&mut unstructured).unwrap_or_default()
22992    }
22993}
22994impl Default for PARAM_EXT_ACK_DATA {
22995    fn default() -> Self {
22996        Self::DEFAULT.clone()
22997    }
22998}
22999impl MessageData for PARAM_EXT_ACK_DATA {
23000    type Message = MavMessage;
23001    const ID: u32 = 324u32;
23002    const NAME: &'static str = "PARAM_EXT_ACK";
23003    const EXTRA_CRC: u8 = 132u8;
23004    const ENCODED_LEN: usize = 146usize;
23005    fn deser(
23006        _version: MavlinkVersion,
23007        __input: &[u8],
23008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23009        let avail_len = __input.len();
23010        let mut payload_buf = [0; Self::ENCODED_LEN];
23011        let mut buf = if avail_len < Self::ENCODED_LEN {
23012            payload_buf[0..avail_len].copy_from_slice(__input);
23013            Bytes::new(&payload_buf)
23014        } else {
23015            Bytes::new(__input)
23016        };
23017        let mut __struct = Self::default();
23018        let mut tmp = [0_u8; 16usize];
23019        for v in &mut tmp {
23020            *v = buf.get_u8();
23021        }
23022        __struct.param_id = CharArray::new(tmp);
23023        let mut tmp = [0_u8; 128usize];
23024        for v in &mut tmp {
23025            *v = buf.get_u8();
23026        }
23027        __struct.param_value = CharArray::new(tmp);
23028        let tmp = buf.get_u8();
23029        __struct.param_type =
23030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23031                enum_type: "MavParamExtType",
23032                value: tmp as u64,
23033            })?;
23034        let tmp = buf.get_u8();
23035        __struct.param_result =
23036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23037                enum_type: "ParamAck",
23038                value: tmp as u64,
23039            })?;
23040        Ok(__struct)
23041    }
23042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23043        let mut __tmp = BytesMut::new(bytes);
23044        #[allow(clippy::absurd_extreme_comparisons)]
23045        #[allow(unused_comparisons)]
23046        if __tmp.remaining() < Self::ENCODED_LEN {
23047            panic!(
23048                "buffer is too small (need {} bytes, but got {})",
23049                Self::ENCODED_LEN,
23050                __tmp.remaining(),
23051            )
23052        }
23053        for val in &self.param_id {
23054            __tmp.put_u8(*val);
23055        }
23056        for val in &self.param_value {
23057            __tmp.put_u8(*val);
23058        }
23059        __tmp.put_u8(self.param_type as u8);
23060        __tmp.put_u8(self.param_result as u8);
23061        if matches!(version, MavlinkVersion::V2) {
23062            let len = __tmp.len();
23063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23064        } else {
23065            __tmp.len()
23066        }
23067    }
23068}
23069#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23070#[doc = ""]
23071#[doc = "ID: 321"]
23072#[derive(Debug, Clone, PartialEq)]
23073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23075#[cfg_attr(feature = "ts", derive(TS))]
23076#[cfg_attr(feature = "ts", ts(export))]
23077pub struct PARAM_EXT_REQUEST_LIST_DATA {
23078    #[doc = "System ID"]
23079    pub target_system: u8,
23080    #[doc = "Component ID"]
23081    pub target_component: u8,
23082}
23083impl PARAM_EXT_REQUEST_LIST_DATA {
23084    pub const ENCODED_LEN: usize = 2usize;
23085    pub const DEFAULT: Self = Self {
23086        target_system: 0_u8,
23087        target_component: 0_u8,
23088    };
23089    #[cfg(feature = "arbitrary")]
23090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23091        use arbitrary::{Arbitrary, Unstructured};
23092        let mut buf = [0u8; 1024];
23093        rng.fill_bytes(&mut buf);
23094        let mut unstructured = Unstructured::new(&buf);
23095        Self::arbitrary(&mut unstructured).unwrap_or_default()
23096    }
23097}
23098impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23099    fn default() -> Self {
23100        Self::DEFAULT.clone()
23101    }
23102}
23103impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23104    type Message = MavMessage;
23105    const ID: u32 = 321u32;
23106    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23107    const EXTRA_CRC: u8 = 88u8;
23108    const ENCODED_LEN: usize = 2usize;
23109    fn deser(
23110        _version: MavlinkVersion,
23111        __input: &[u8],
23112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23113        let avail_len = __input.len();
23114        let mut payload_buf = [0; Self::ENCODED_LEN];
23115        let mut buf = if avail_len < Self::ENCODED_LEN {
23116            payload_buf[0..avail_len].copy_from_slice(__input);
23117            Bytes::new(&payload_buf)
23118        } else {
23119            Bytes::new(__input)
23120        };
23121        let mut __struct = Self::default();
23122        __struct.target_system = buf.get_u8();
23123        __struct.target_component = buf.get_u8();
23124        Ok(__struct)
23125    }
23126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23127        let mut __tmp = BytesMut::new(bytes);
23128        #[allow(clippy::absurd_extreme_comparisons)]
23129        #[allow(unused_comparisons)]
23130        if __tmp.remaining() < Self::ENCODED_LEN {
23131            panic!(
23132                "buffer is too small (need {} bytes, but got {})",
23133                Self::ENCODED_LEN,
23134                __tmp.remaining(),
23135            )
23136        }
23137        __tmp.put_u8(self.target_system);
23138        __tmp.put_u8(self.target_component);
23139        if matches!(version, MavlinkVersion::V2) {
23140            let len = __tmp.len();
23141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23142        } else {
23143            __tmp.len()
23144        }
23145    }
23146}
23147#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23148#[doc = ""]
23149#[doc = "ID: 320"]
23150#[derive(Debug, Clone, PartialEq)]
23151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23153#[cfg_attr(feature = "ts", derive(TS))]
23154#[cfg_attr(feature = "ts", ts(export))]
23155pub struct PARAM_EXT_REQUEST_READ_DATA {
23156    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23157    pub param_index: i16,
23158    #[doc = "System ID"]
23159    pub target_system: u8,
23160    #[doc = "Component ID"]
23161    pub target_component: u8,
23162    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23163    #[cfg_attr(feature = "ts", ts(type = "string"))]
23164    pub param_id: CharArray<16>,
23165}
23166impl PARAM_EXT_REQUEST_READ_DATA {
23167    pub const ENCODED_LEN: usize = 20usize;
23168    pub const DEFAULT: Self = Self {
23169        param_index: 0_i16,
23170        target_system: 0_u8,
23171        target_component: 0_u8,
23172        param_id: CharArray::new([0_u8; 16usize]),
23173    };
23174    #[cfg(feature = "arbitrary")]
23175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23176        use arbitrary::{Arbitrary, Unstructured};
23177        let mut buf = [0u8; 1024];
23178        rng.fill_bytes(&mut buf);
23179        let mut unstructured = Unstructured::new(&buf);
23180        Self::arbitrary(&mut unstructured).unwrap_or_default()
23181    }
23182}
23183impl Default for PARAM_EXT_REQUEST_READ_DATA {
23184    fn default() -> Self {
23185        Self::DEFAULT.clone()
23186    }
23187}
23188impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23189    type Message = MavMessage;
23190    const ID: u32 = 320u32;
23191    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23192    const EXTRA_CRC: u8 = 243u8;
23193    const ENCODED_LEN: usize = 20usize;
23194    fn deser(
23195        _version: MavlinkVersion,
23196        __input: &[u8],
23197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23198        let avail_len = __input.len();
23199        let mut payload_buf = [0; Self::ENCODED_LEN];
23200        let mut buf = if avail_len < Self::ENCODED_LEN {
23201            payload_buf[0..avail_len].copy_from_slice(__input);
23202            Bytes::new(&payload_buf)
23203        } else {
23204            Bytes::new(__input)
23205        };
23206        let mut __struct = Self::default();
23207        __struct.param_index = buf.get_i16_le();
23208        __struct.target_system = buf.get_u8();
23209        __struct.target_component = buf.get_u8();
23210        let mut tmp = [0_u8; 16usize];
23211        for v in &mut tmp {
23212            *v = buf.get_u8();
23213        }
23214        __struct.param_id = CharArray::new(tmp);
23215        Ok(__struct)
23216    }
23217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23218        let mut __tmp = BytesMut::new(bytes);
23219        #[allow(clippy::absurd_extreme_comparisons)]
23220        #[allow(unused_comparisons)]
23221        if __tmp.remaining() < Self::ENCODED_LEN {
23222            panic!(
23223                "buffer is too small (need {} bytes, but got {})",
23224                Self::ENCODED_LEN,
23225                __tmp.remaining(),
23226            )
23227        }
23228        __tmp.put_i16_le(self.param_index);
23229        __tmp.put_u8(self.target_system);
23230        __tmp.put_u8(self.target_component);
23231        for val in &self.param_id {
23232            __tmp.put_u8(*val);
23233        }
23234        if matches!(version, MavlinkVersion::V2) {
23235            let len = __tmp.len();
23236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23237        } else {
23238            __tmp.len()
23239        }
23240    }
23241}
23242#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23243#[doc = ""]
23244#[doc = "ID: 323"]
23245#[derive(Debug, Clone, PartialEq)]
23246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23248#[cfg_attr(feature = "ts", derive(TS))]
23249#[cfg_attr(feature = "ts", ts(export))]
23250pub struct PARAM_EXT_SET_DATA {
23251    #[doc = "System ID"]
23252    pub target_system: u8,
23253    #[doc = "Component ID"]
23254    pub target_component: u8,
23255    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23256    #[cfg_attr(feature = "ts", ts(type = "string"))]
23257    pub param_id: CharArray<16>,
23258    #[doc = "Parameter value"]
23259    #[cfg_attr(feature = "ts", ts(type = "string"))]
23260    pub param_value: CharArray<128>,
23261    #[doc = "Parameter type."]
23262    pub param_type: MavParamExtType,
23263}
23264impl PARAM_EXT_SET_DATA {
23265    pub const ENCODED_LEN: usize = 147usize;
23266    pub const DEFAULT: Self = Self {
23267        target_system: 0_u8,
23268        target_component: 0_u8,
23269        param_id: CharArray::new([0_u8; 16usize]),
23270        param_value: CharArray::new([0_u8; 128usize]),
23271        param_type: MavParamExtType::DEFAULT,
23272    };
23273    #[cfg(feature = "arbitrary")]
23274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23275        use arbitrary::{Arbitrary, Unstructured};
23276        let mut buf = [0u8; 1024];
23277        rng.fill_bytes(&mut buf);
23278        let mut unstructured = Unstructured::new(&buf);
23279        Self::arbitrary(&mut unstructured).unwrap_or_default()
23280    }
23281}
23282impl Default for PARAM_EXT_SET_DATA {
23283    fn default() -> Self {
23284        Self::DEFAULT.clone()
23285    }
23286}
23287impl MessageData for PARAM_EXT_SET_DATA {
23288    type Message = MavMessage;
23289    const ID: u32 = 323u32;
23290    const NAME: &'static str = "PARAM_EXT_SET";
23291    const EXTRA_CRC: u8 = 78u8;
23292    const ENCODED_LEN: usize = 147usize;
23293    fn deser(
23294        _version: MavlinkVersion,
23295        __input: &[u8],
23296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23297        let avail_len = __input.len();
23298        let mut payload_buf = [0; Self::ENCODED_LEN];
23299        let mut buf = if avail_len < Self::ENCODED_LEN {
23300            payload_buf[0..avail_len].copy_from_slice(__input);
23301            Bytes::new(&payload_buf)
23302        } else {
23303            Bytes::new(__input)
23304        };
23305        let mut __struct = Self::default();
23306        __struct.target_system = buf.get_u8();
23307        __struct.target_component = buf.get_u8();
23308        let mut tmp = [0_u8; 16usize];
23309        for v in &mut tmp {
23310            *v = buf.get_u8();
23311        }
23312        __struct.param_id = CharArray::new(tmp);
23313        let mut tmp = [0_u8; 128usize];
23314        for v in &mut tmp {
23315            *v = buf.get_u8();
23316        }
23317        __struct.param_value = CharArray::new(tmp);
23318        let tmp = buf.get_u8();
23319        __struct.param_type =
23320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23321                enum_type: "MavParamExtType",
23322                value: tmp as u64,
23323            })?;
23324        Ok(__struct)
23325    }
23326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23327        let mut __tmp = BytesMut::new(bytes);
23328        #[allow(clippy::absurd_extreme_comparisons)]
23329        #[allow(unused_comparisons)]
23330        if __tmp.remaining() < Self::ENCODED_LEN {
23331            panic!(
23332                "buffer is too small (need {} bytes, but got {})",
23333                Self::ENCODED_LEN,
23334                __tmp.remaining(),
23335            )
23336        }
23337        __tmp.put_u8(self.target_system);
23338        __tmp.put_u8(self.target_component);
23339        for val in &self.param_id {
23340            __tmp.put_u8(*val);
23341        }
23342        for val in &self.param_value {
23343            __tmp.put_u8(*val);
23344        }
23345        __tmp.put_u8(self.param_type as u8);
23346        if matches!(version, MavlinkVersion::V2) {
23347            let len = __tmp.len();
23348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23349        } else {
23350            __tmp.len()
23351        }
23352    }
23353}
23354#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23355#[doc = ""]
23356#[doc = "ID: 322"]
23357#[derive(Debug, Clone, PartialEq)]
23358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23360#[cfg_attr(feature = "ts", derive(TS))]
23361#[cfg_attr(feature = "ts", ts(export))]
23362pub struct PARAM_EXT_VALUE_DATA {
23363    #[doc = "Total number of parameters"]
23364    pub param_count: u16,
23365    #[doc = "Index of this parameter"]
23366    pub param_index: u16,
23367    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23368    #[cfg_attr(feature = "ts", ts(type = "string"))]
23369    pub param_id: CharArray<16>,
23370    #[doc = "Parameter value"]
23371    #[cfg_attr(feature = "ts", ts(type = "string"))]
23372    pub param_value: CharArray<128>,
23373    #[doc = "Parameter type."]
23374    pub param_type: MavParamExtType,
23375}
23376impl PARAM_EXT_VALUE_DATA {
23377    pub const ENCODED_LEN: usize = 149usize;
23378    pub const DEFAULT: Self = Self {
23379        param_count: 0_u16,
23380        param_index: 0_u16,
23381        param_id: CharArray::new([0_u8; 16usize]),
23382        param_value: CharArray::new([0_u8; 128usize]),
23383        param_type: MavParamExtType::DEFAULT,
23384    };
23385    #[cfg(feature = "arbitrary")]
23386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23387        use arbitrary::{Arbitrary, Unstructured};
23388        let mut buf = [0u8; 1024];
23389        rng.fill_bytes(&mut buf);
23390        let mut unstructured = Unstructured::new(&buf);
23391        Self::arbitrary(&mut unstructured).unwrap_or_default()
23392    }
23393}
23394impl Default for PARAM_EXT_VALUE_DATA {
23395    fn default() -> Self {
23396        Self::DEFAULT.clone()
23397    }
23398}
23399impl MessageData for PARAM_EXT_VALUE_DATA {
23400    type Message = MavMessage;
23401    const ID: u32 = 322u32;
23402    const NAME: &'static str = "PARAM_EXT_VALUE";
23403    const EXTRA_CRC: u8 = 243u8;
23404    const ENCODED_LEN: usize = 149usize;
23405    fn deser(
23406        _version: MavlinkVersion,
23407        __input: &[u8],
23408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23409        let avail_len = __input.len();
23410        let mut payload_buf = [0; Self::ENCODED_LEN];
23411        let mut buf = if avail_len < Self::ENCODED_LEN {
23412            payload_buf[0..avail_len].copy_from_slice(__input);
23413            Bytes::new(&payload_buf)
23414        } else {
23415            Bytes::new(__input)
23416        };
23417        let mut __struct = Self::default();
23418        __struct.param_count = buf.get_u16_le();
23419        __struct.param_index = buf.get_u16_le();
23420        let mut tmp = [0_u8; 16usize];
23421        for v in &mut tmp {
23422            *v = buf.get_u8();
23423        }
23424        __struct.param_id = CharArray::new(tmp);
23425        let mut tmp = [0_u8; 128usize];
23426        for v in &mut tmp {
23427            *v = buf.get_u8();
23428        }
23429        __struct.param_value = CharArray::new(tmp);
23430        let tmp = buf.get_u8();
23431        __struct.param_type =
23432            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23433                enum_type: "MavParamExtType",
23434                value: tmp as u64,
23435            })?;
23436        Ok(__struct)
23437    }
23438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23439        let mut __tmp = BytesMut::new(bytes);
23440        #[allow(clippy::absurd_extreme_comparisons)]
23441        #[allow(unused_comparisons)]
23442        if __tmp.remaining() < Self::ENCODED_LEN {
23443            panic!(
23444                "buffer is too small (need {} bytes, but got {})",
23445                Self::ENCODED_LEN,
23446                __tmp.remaining(),
23447            )
23448        }
23449        __tmp.put_u16_le(self.param_count);
23450        __tmp.put_u16_le(self.param_index);
23451        for val in &self.param_id {
23452            __tmp.put_u8(*val);
23453        }
23454        for val in &self.param_value {
23455            __tmp.put_u8(*val);
23456        }
23457        __tmp.put_u8(self.param_type as u8);
23458        if matches!(version, MavlinkVersion::V2) {
23459            let len = __tmp.len();
23460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23461        } else {
23462            __tmp.len()
23463        }
23464    }
23465}
23466#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23467#[doc = ""]
23468#[doc = "ID: 50"]
23469#[derive(Debug, Clone, PartialEq)]
23470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23472#[cfg_attr(feature = "ts", derive(TS))]
23473#[cfg_attr(feature = "ts", ts(export))]
23474pub struct PARAM_MAP_RC_DATA {
23475    #[doc = "Initial parameter value"]
23476    pub param_value0: f32,
23477    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23478    pub scale: f32,
23479    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23480    pub param_value_min: f32,
23481    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23482    pub param_value_max: f32,
23483    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23484    pub param_index: i16,
23485    #[doc = "System ID"]
23486    pub target_system: u8,
23487    #[doc = "Component ID"]
23488    pub target_component: u8,
23489    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23490    #[cfg_attr(feature = "ts", ts(type = "string"))]
23491    pub param_id: CharArray<16>,
23492    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23493    pub parameter_rc_channel_index: u8,
23494}
23495impl PARAM_MAP_RC_DATA {
23496    pub const ENCODED_LEN: usize = 37usize;
23497    pub const DEFAULT: Self = Self {
23498        param_value0: 0.0_f32,
23499        scale: 0.0_f32,
23500        param_value_min: 0.0_f32,
23501        param_value_max: 0.0_f32,
23502        param_index: 0_i16,
23503        target_system: 0_u8,
23504        target_component: 0_u8,
23505        param_id: CharArray::new([0_u8; 16usize]),
23506        parameter_rc_channel_index: 0_u8,
23507    };
23508    #[cfg(feature = "arbitrary")]
23509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23510        use arbitrary::{Arbitrary, Unstructured};
23511        let mut buf = [0u8; 1024];
23512        rng.fill_bytes(&mut buf);
23513        let mut unstructured = Unstructured::new(&buf);
23514        Self::arbitrary(&mut unstructured).unwrap_or_default()
23515    }
23516}
23517impl Default for PARAM_MAP_RC_DATA {
23518    fn default() -> Self {
23519        Self::DEFAULT.clone()
23520    }
23521}
23522impl MessageData for PARAM_MAP_RC_DATA {
23523    type Message = MavMessage;
23524    const ID: u32 = 50u32;
23525    const NAME: &'static str = "PARAM_MAP_RC";
23526    const EXTRA_CRC: u8 = 78u8;
23527    const ENCODED_LEN: usize = 37usize;
23528    fn deser(
23529        _version: MavlinkVersion,
23530        __input: &[u8],
23531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23532        let avail_len = __input.len();
23533        let mut payload_buf = [0; Self::ENCODED_LEN];
23534        let mut buf = if avail_len < Self::ENCODED_LEN {
23535            payload_buf[0..avail_len].copy_from_slice(__input);
23536            Bytes::new(&payload_buf)
23537        } else {
23538            Bytes::new(__input)
23539        };
23540        let mut __struct = Self::default();
23541        __struct.param_value0 = buf.get_f32_le();
23542        __struct.scale = buf.get_f32_le();
23543        __struct.param_value_min = buf.get_f32_le();
23544        __struct.param_value_max = buf.get_f32_le();
23545        __struct.param_index = buf.get_i16_le();
23546        __struct.target_system = buf.get_u8();
23547        __struct.target_component = buf.get_u8();
23548        let mut tmp = [0_u8; 16usize];
23549        for v in &mut tmp {
23550            *v = buf.get_u8();
23551        }
23552        __struct.param_id = CharArray::new(tmp);
23553        __struct.parameter_rc_channel_index = buf.get_u8();
23554        Ok(__struct)
23555    }
23556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23557        let mut __tmp = BytesMut::new(bytes);
23558        #[allow(clippy::absurd_extreme_comparisons)]
23559        #[allow(unused_comparisons)]
23560        if __tmp.remaining() < Self::ENCODED_LEN {
23561            panic!(
23562                "buffer is too small (need {} bytes, but got {})",
23563                Self::ENCODED_LEN,
23564                __tmp.remaining(),
23565            )
23566        }
23567        __tmp.put_f32_le(self.param_value0);
23568        __tmp.put_f32_le(self.scale);
23569        __tmp.put_f32_le(self.param_value_min);
23570        __tmp.put_f32_le(self.param_value_max);
23571        __tmp.put_i16_le(self.param_index);
23572        __tmp.put_u8(self.target_system);
23573        __tmp.put_u8(self.target_component);
23574        for val in &self.param_id {
23575            __tmp.put_u8(*val);
23576        }
23577        __tmp.put_u8(self.parameter_rc_channel_index);
23578        if matches!(version, MavlinkVersion::V2) {
23579            let len = __tmp.len();
23580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23581        } else {
23582            __tmp.len()
23583        }
23584    }
23585}
23586#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23587#[doc = ""]
23588#[doc = "ID: 21"]
23589#[derive(Debug, Clone, PartialEq)]
23590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23591#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23592#[cfg_attr(feature = "ts", derive(TS))]
23593#[cfg_attr(feature = "ts", ts(export))]
23594pub struct PARAM_REQUEST_LIST_DATA {
23595    #[doc = "System ID"]
23596    pub target_system: u8,
23597    #[doc = "Component ID"]
23598    pub target_component: u8,
23599}
23600impl PARAM_REQUEST_LIST_DATA {
23601    pub const ENCODED_LEN: usize = 2usize;
23602    pub const DEFAULT: Self = Self {
23603        target_system: 0_u8,
23604        target_component: 0_u8,
23605    };
23606    #[cfg(feature = "arbitrary")]
23607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23608        use arbitrary::{Arbitrary, Unstructured};
23609        let mut buf = [0u8; 1024];
23610        rng.fill_bytes(&mut buf);
23611        let mut unstructured = Unstructured::new(&buf);
23612        Self::arbitrary(&mut unstructured).unwrap_or_default()
23613    }
23614}
23615impl Default for PARAM_REQUEST_LIST_DATA {
23616    fn default() -> Self {
23617        Self::DEFAULT.clone()
23618    }
23619}
23620impl MessageData for PARAM_REQUEST_LIST_DATA {
23621    type Message = MavMessage;
23622    const ID: u32 = 21u32;
23623    const NAME: &'static str = "PARAM_REQUEST_LIST";
23624    const EXTRA_CRC: u8 = 159u8;
23625    const ENCODED_LEN: usize = 2usize;
23626    fn deser(
23627        _version: MavlinkVersion,
23628        __input: &[u8],
23629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23630        let avail_len = __input.len();
23631        let mut payload_buf = [0; Self::ENCODED_LEN];
23632        let mut buf = if avail_len < Self::ENCODED_LEN {
23633            payload_buf[0..avail_len].copy_from_slice(__input);
23634            Bytes::new(&payload_buf)
23635        } else {
23636            Bytes::new(__input)
23637        };
23638        let mut __struct = Self::default();
23639        __struct.target_system = buf.get_u8();
23640        __struct.target_component = buf.get_u8();
23641        Ok(__struct)
23642    }
23643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23644        let mut __tmp = BytesMut::new(bytes);
23645        #[allow(clippy::absurd_extreme_comparisons)]
23646        #[allow(unused_comparisons)]
23647        if __tmp.remaining() < Self::ENCODED_LEN {
23648            panic!(
23649                "buffer is too small (need {} bytes, but got {})",
23650                Self::ENCODED_LEN,
23651                __tmp.remaining(),
23652            )
23653        }
23654        __tmp.put_u8(self.target_system);
23655        __tmp.put_u8(self.target_component);
23656        if matches!(version, MavlinkVersion::V2) {
23657            let len = __tmp.len();
23658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23659        } else {
23660            __tmp.len()
23661        }
23662    }
23663}
23664#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23665#[doc = ""]
23666#[doc = "ID: 20"]
23667#[derive(Debug, Clone, PartialEq)]
23668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23670#[cfg_attr(feature = "ts", derive(TS))]
23671#[cfg_attr(feature = "ts", ts(export))]
23672pub struct PARAM_REQUEST_READ_DATA {
23673    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23674    pub param_index: i16,
23675    #[doc = "System ID"]
23676    pub target_system: u8,
23677    #[doc = "Component ID"]
23678    pub target_component: u8,
23679    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23680    #[cfg_attr(feature = "ts", ts(type = "string"))]
23681    pub param_id: CharArray<16>,
23682}
23683impl PARAM_REQUEST_READ_DATA {
23684    pub const ENCODED_LEN: usize = 20usize;
23685    pub const DEFAULT: Self = Self {
23686        param_index: 0_i16,
23687        target_system: 0_u8,
23688        target_component: 0_u8,
23689        param_id: CharArray::new([0_u8; 16usize]),
23690    };
23691    #[cfg(feature = "arbitrary")]
23692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23693        use arbitrary::{Arbitrary, Unstructured};
23694        let mut buf = [0u8; 1024];
23695        rng.fill_bytes(&mut buf);
23696        let mut unstructured = Unstructured::new(&buf);
23697        Self::arbitrary(&mut unstructured).unwrap_or_default()
23698    }
23699}
23700impl Default for PARAM_REQUEST_READ_DATA {
23701    fn default() -> Self {
23702        Self::DEFAULT.clone()
23703    }
23704}
23705impl MessageData for PARAM_REQUEST_READ_DATA {
23706    type Message = MavMessage;
23707    const ID: u32 = 20u32;
23708    const NAME: &'static str = "PARAM_REQUEST_READ";
23709    const EXTRA_CRC: u8 = 214u8;
23710    const ENCODED_LEN: usize = 20usize;
23711    fn deser(
23712        _version: MavlinkVersion,
23713        __input: &[u8],
23714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23715        let avail_len = __input.len();
23716        let mut payload_buf = [0; Self::ENCODED_LEN];
23717        let mut buf = if avail_len < Self::ENCODED_LEN {
23718            payload_buf[0..avail_len].copy_from_slice(__input);
23719            Bytes::new(&payload_buf)
23720        } else {
23721            Bytes::new(__input)
23722        };
23723        let mut __struct = Self::default();
23724        __struct.param_index = buf.get_i16_le();
23725        __struct.target_system = buf.get_u8();
23726        __struct.target_component = buf.get_u8();
23727        let mut tmp = [0_u8; 16usize];
23728        for v in &mut tmp {
23729            *v = buf.get_u8();
23730        }
23731        __struct.param_id = CharArray::new(tmp);
23732        Ok(__struct)
23733    }
23734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23735        let mut __tmp = BytesMut::new(bytes);
23736        #[allow(clippy::absurd_extreme_comparisons)]
23737        #[allow(unused_comparisons)]
23738        if __tmp.remaining() < Self::ENCODED_LEN {
23739            panic!(
23740                "buffer is too small (need {} bytes, but got {})",
23741                Self::ENCODED_LEN,
23742                __tmp.remaining(),
23743            )
23744        }
23745        __tmp.put_i16_le(self.param_index);
23746        __tmp.put_u8(self.target_system);
23747        __tmp.put_u8(self.target_component);
23748        for val in &self.param_id {
23749            __tmp.put_u8(*val);
23750        }
23751        if matches!(version, MavlinkVersion::V2) {
23752            let len = __tmp.len();
23753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23754        } else {
23755            __tmp.len()
23756        }
23757    }
23758}
23759#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23760#[doc = ""]
23761#[doc = "ID: 23"]
23762#[derive(Debug, Clone, PartialEq)]
23763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23765#[cfg_attr(feature = "ts", derive(TS))]
23766#[cfg_attr(feature = "ts", ts(export))]
23767pub struct PARAM_SET_DATA {
23768    #[doc = "Onboard parameter value"]
23769    pub param_value: f32,
23770    #[doc = "System ID"]
23771    pub target_system: u8,
23772    #[doc = "Component ID"]
23773    pub target_component: u8,
23774    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23775    #[cfg_attr(feature = "ts", ts(type = "string"))]
23776    pub param_id: CharArray<16>,
23777    #[doc = "Onboard parameter type."]
23778    pub param_type: MavParamType,
23779}
23780impl PARAM_SET_DATA {
23781    pub const ENCODED_LEN: usize = 23usize;
23782    pub const DEFAULT: Self = Self {
23783        param_value: 0.0_f32,
23784        target_system: 0_u8,
23785        target_component: 0_u8,
23786        param_id: CharArray::new([0_u8; 16usize]),
23787        param_type: MavParamType::DEFAULT,
23788    };
23789    #[cfg(feature = "arbitrary")]
23790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23791        use arbitrary::{Arbitrary, Unstructured};
23792        let mut buf = [0u8; 1024];
23793        rng.fill_bytes(&mut buf);
23794        let mut unstructured = Unstructured::new(&buf);
23795        Self::arbitrary(&mut unstructured).unwrap_or_default()
23796    }
23797}
23798impl Default for PARAM_SET_DATA {
23799    fn default() -> Self {
23800        Self::DEFAULT.clone()
23801    }
23802}
23803impl MessageData for PARAM_SET_DATA {
23804    type Message = MavMessage;
23805    const ID: u32 = 23u32;
23806    const NAME: &'static str = "PARAM_SET";
23807    const EXTRA_CRC: u8 = 168u8;
23808    const ENCODED_LEN: usize = 23usize;
23809    fn deser(
23810        _version: MavlinkVersion,
23811        __input: &[u8],
23812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23813        let avail_len = __input.len();
23814        let mut payload_buf = [0; Self::ENCODED_LEN];
23815        let mut buf = if avail_len < Self::ENCODED_LEN {
23816            payload_buf[0..avail_len].copy_from_slice(__input);
23817            Bytes::new(&payload_buf)
23818        } else {
23819            Bytes::new(__input)
23820        };
23821        let mut __struct = Self::default();
23822        __struct.param_value = buf.get_f32_le();
23823        __struct.target_system = buf.get_u8();
23824        __struct.target_component = buf.get_u8();
23825        let mut tmp = [0_u8; 16usize];
23826        for v in &mut tmp {
23827            *v = buf.get_u8();
23828        }
23829        __struct.param_id = CharArray::new(tmp);
23830        let tmp = buf.get_u8();
23831        __struct.param_type =
23832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23833                enum_type: "MavParamType",
23834                value: tmp as u64,
23835            })?;
23836        Ok(__struct)
23837    }
23838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23839        let mut __tmp = BytesMut::new(bytes);
23840        #[allow(clippy::absurd_extreme_comparisons)]
23841        #[allow(unused_comparisons)]
23842        if __tmp.remaining() < Self::ENCODED_LEN {
23843            panic!(
23844                "buffer is too small (need {} bytes, but got {})",
23845                Self::ENCODED_LEN,
23846                __tmp.remaining(),
23847            )
23848        }
23849        __tmp.put_f32_le(self.param_value);
23850        __tmp.put_u8(self.target_system);
23851        __tmp.put_u8(self.target_component);
23852        for val in &self.param_id {
23853            __tmp.put_u8(*val);
23854        }
23855        __tmp.put_u8(self.param_type as u8);
23856        if matches!(version, MavlinkVersion::V2) {
23857            let len = __tmp.len();
23858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23859        } else {
23860            __tmp.len()
23861        }
23862    }
23863}
23864#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23865#[doc = ""]
23866#[doc = "ID: 22"]
23867#[derive(Debug, Clone, PartialEq)]
23868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23870#[cfg_attr(feature = "ts", derive(TS))]
23871#[cfg_attr(feature = "ts", ts(export))]
23872pub struct PARAM_VALUE_DATA {
23873    #[doc = "Onboard parameter value"]
23874    pub param_value: f32,
23875    #[doc = "Total number of onboard parameters"]
23876    pub param_count: u16,
23877    #[doc = "Index of this onboard parameter"]
23878    pub param_index: u16,
23879    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23880    #[cfg_attr(feature = "ts", ts(type = "string"))]
23881    pub param_id: CharArray<16>,
23882    #[doc = "Onboard parameter type."]
23883    pub param_type: MavParamType,
23884}
23885impl PARAM_VALUE_DATA {
23886    pub const ENCODED_LEN: usize = 25usize;
23887    pub const DEFAULT: Self = Self {
23888        param_value: 0.0_f32,
23889        param_count: 0_u16,
23890        param_index: 0_u16,
23891        param_id: CharArray::new([0_u8; 16usize]),
23892        param_type: MavParamType::DEFAULT,
23893    };
23894    #[cfg(feature = "arbitrary")]
23895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23896        use arbitrary::{Arbitrary, Unstructured};
23897        let mut buf = [0u8; 1024];
23898        rng.fill_bytes(&mut buf);
23899        let mut unstructured = Unstructured::new(&buf);
23900        Self::arbitrary(&mut unstructured).unwrap_or_default()
23901    }
23902}
23903impl Default for PARAM_VALUE_DATA {
23904    fn default() -> Self {
23905        Self::DEFAULT.clone()
23906    }
23907}
23908impl MessageData for PARAM_VALUE_DATA {
23909    type Message = MavMessage;
23910    const ID: u32 = 22u32;
23911    const NAME: &'static str = "PARAM_VALUE";
23912    const EXTRA_CRC: u8 = 220u8;
23913    const ENCODED_LEN: usize = 25usize;
23914    fn deser(
23915        _version: MavlinkVersion,
23916        __input: &[u8],
23917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23918        let avail_len = __input.len();
23919        let mut payload_buf = [0; Self::ENCODED_LEN];
23920        let mut buf = if avail_len < Self::ENCODED_LEN {
23921            payload_buf[0..avail_len].copy_from_slice(__input);
23922            Bytes::new(&payload_buf)
23923        } else {
23924            Bytes::new(__input)
23925        };
23926        let mut __struct = Self::default();
23927        __struct.param_value = buf.get_f32_le();
23928        __struct.param_count = buf.get_u16_le();
23929        __struct.param_index = buf.get_u16_le();
23930        let mut tmp = [0_u8; 16usize];
23931        for v in &mut tmp {
23932            *v = buf.get_u8();
23933        }
23934        __struct.param_id = CharArray::new(tmp);
23935        let tmp = buf.get_u8();
23936        __struct.param_type =
23937            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23938                enum_type: "MavParamType",
23939                value: tmp as u64,
23940            })?;
23941        Ok(__struct)
23942    }
23943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23944        let mut __tmp = BytesMut::new(bytes);
23945        #[allow(clippy::absurd_extreme_comparisons)]
23946        #[allow(unused_comparisons)]
23947        if __tmp.remaining() < Self::ENCODED_LEN {
23948            panic!(
23949                "buffer is too small (need {} bytes, but got {})",
23950                Self::ENCODED_LEN,
23951                __tmp.remaining(),
23952            )
23953        }
23954        __tmp.put_f32_le(self.param_value);
23955        __tmp.put_u16_le(self.param_count);
23956        __tmp.put_u16_le(self.param_index);
23957        for val in &self.param_id {
23958            __tmp.put_u8(*val);
23959        }
23960        __tmp.put_u8(self.param_type as u8);
23961        if matches!(version, MavlinkVersion::V2) {
23962            let len = __tmp.len();
23963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23964        } else {
23965            __tmp.len()
23966        }
23967    }
23968}
23969#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23970#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23971#[doc = ""]
23972#[doc = "ID: 4"]
23973#[derive(Debug, Clone, PartialEq)]
23974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23976#[cfg_attr(feature = "ts", derive(TS))]
23977#[cfg_attr(feature = "ts", ts(export))]
23978pub struct PING_DATA {
23979    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23980    pub time_usec: u64,
23981    #[doc = "PING sequence"]
23982    pub seq: u32,
23983    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23984    pub target_system: u8,
23985    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23986    pub target_component: u8,
23987}
23988impl PING_DATA {
23989    pub const ENCODED_LEN: usize = 14usize;
23990    pub const DEFAULT: Self = Self {
23991        time_usec: 0_u64,
23992        seq: 0_u32,
23993        target_system: 0_u8,
23994        target_component: 0_u8,
23995    };
23996    #[cfg(feature = "arbitrary")]
23997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23998        use arbitrary::{Arbitrary, Unstructured};
23999        let mut buf = [0u8; 1024];
24000        rng.fill_bytes(&mut buf);
24001        let mut unstructured = Unstructured::new(&buf);
24002        Self::arbitrary(&mut unstructured).unwrap_or_default()
24003    }
24004}
24005impl Default for PING_DATA {
24006    fn default() -> Self {
24007        Self::DEFAULT.clone()
24008    }
24009}
24010impl MessageData for PING_DATA {
24011    type Message = MavMessage;
24012    const ID: u32 = 4u32;
24013    const NAME: &'static str = "PING";
24014    const EXTRA_CRC: u8 = 237u8;
24015    const ENCODED_LEN: usize = 14usize;
24016    fn deser(
24017        _version: MavlinkVersion,
24018        __input: &[u8],
24019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24020        let avail_len = __input.len();
24021        let mut payload_buf = [0; Self::ENCODED_LEN];
24022        let mut buf = if avail_len < Self::ENCODED_LEN {
24023            payload_buf[0..avail_len].copy_from_slice(__input);
24024            Bytes::new(&payload_buf)
24025        } else {
24026            Bytes::new(__input)
24027        };
24028        let mut __struct = Self::default();
24029        __struct.time_usec = buf.get_u64_le();
24030        __struct.seq = buf.get_u32_le();
24031        __struct.target_system = buf.get_u8();
24032        __struct.target_component = buf.get_u8();
24033        Ok(__struct)
24034    }
24035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24036        let mut __tmp = BytesMut::new(bytes);
24037        #[allow(clippy::absurd_extreme_comparisons)]
24038        #[allow(unused_comparisons)]
24039        if __tmp.remaining() < Self::ENCODED_LEN {
24040            panic!(
24041                "buffer is too small (need {} bytes, but got {})",
24042                Self::ENCODED_LEN,
24043                __tmp.remaining(),
24044            )
24045        }
24046        __tmp.put_u64_le(self.time_usec);
24047        __tmp.put_u32_le(self.seq);
24048        __tmp.put_u8(self.target_system);
24049        __tmp.put_u8(self.target_component);
24050        if matches!(version, MavlinkVersion::V2) {
24051            let len = __tmp.len();
24052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24053        } else {
24054            __tmp.len()
24055        }
24056    }
24057}
24058#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24059#[doc = "Control vehicle tone generation (buzzer)."]
24060#[doc = ""]
24061#[doc = "ID: 258"]
24062#[derive(Debug, Clone, PartialEq)]
24063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24065#[cfg_attr(feature = "ts", derive(TS))]
24066#[cfg_attr(feature = "ts", ts(export))]
24067pub struct PLAY_TUNE_DATA {
24068    #[doc = "System ID"]
24069    pub target_system: u8,
24070    #[doc = "Component ID"]
24071    pub target_component: u8,
24072    #[doc = "tune in board specific format"]
24073    #[cfg_attr(feature = "ts", ts(type = "string"))]
24074    pub tune: CharArray<30>,
24075    #[doc = "tune extension (appended to tune)"]
24076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24077    #[cfg_attr(feature = "ts", ts(type = "string"))]
24078    pub tune2: CharArray<200>,
24079}
24080impl PLAY_TUNE_DATA {
24081    pub const ENCODED_LEN: usize = 232usize;
24082    pub const DEFAULT: Self = Self {
24083        target_system: 0_u8,
24084        target_component: 0_u8,
24085        tune: CharArray::new([0_u8; 30usize]),
24086        tune2: CharArray::new([0_u8; 200usize]),
24087    };
24088    #[cfg(feature = "arbitrary")]
24089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24090        use arbitrary::{Arbitrary, Unstructured};
24091        let mut buf = [0u8; 1024];
24092        rng.fill_bytes(&mut buf);
24093        let mut unstructured = Unstructured::new(&buf);
24094        Self::arbitrary(&mut unstructured).unwrap_or_default()
24095    }
24096}
24097impl Default for PLAY_TUNE_DATA {
24098    fn default() -> Self {
24099        Self::DEFAULT.clone()
24100    }
24101}
24102impl MessageData for PLAY_TUNE_DATA {
24103    type Message = MavMessage;
24104    const ID: u32 = 258u32;
24105    const NAME: &'static str = "PLAY_TUNE";
24106    const EXTRA_CRC: u8 = 187u8;
24107    const ENCODED_LEN: usize = 232usize;
24108    fn deser(
24109        _version: MavlinkVersion,
24110        __input: &[u8],
24111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24112        let avail_len = __input.len();
24113        let mut payload_buf = [0; Self::ENCODED_LEN];
24114        let mut buf = if avail_len < Self::ENCODED_LEN {
24115            payload_buf[0..avail_len].copy_from_slice(__input);
24116            Bytes::new(&payload_buf)
24117        } else {
24118            Bytes::new(__input)
24119        };
24120        let mut __struct = Self::default();
24121        __struct.target_system = buf.get_u8();
24122        __struct.target_component = buf.get_u8();
24123        let mut tmp = [0_u8; 30usize];
24124        for v in &mut tmp {
24125            *v = buf.get_u8();
24126        }
24127        __struct.tune = CharArray::new(tmp);
24128        let mut tmp = [0_u8; 200usize];
24129        for v in &mut tmp {
24130            *v = buf.get_u8();
24131        }
24132        __struct.tune2 = CharArray::new(tmp);
24133        Ok(__struct)
24134    }
24135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24136        let mut __tmp = BytesMut::new(bytes);
24137        #[allow(clippy::absurd_extreme_comparisons)]
24138        #[allow(unused_comparisons)]
24139        if __tmp.remaining() < Self::ENCODED_LEN {
24140            panic!(
24141                "buffer is too small (need {} bytes, but got {})",
24142                Self::ENCODED_LEN,
24143                __tmp.remaining(),
24144            )
24145        }
24146        __tmp.put_u8(self.target_system);
24147        __tmp.put_u8(self.target_component);
24148        for val in &self.tune {
24149            __tmp.put_u8(*val);
24150        }
24151        if matches!(version, MavlinkVersion::V2) {
24152            for val in &self.tune2 {
24153                __tmp.put_u8(*val);
24154            }
24155            let len = __tmp.len();
24156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24157        } else {
24158            __tmp.len()
24159        }
24160    }
24161}
24162#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24163#[doc = ""]
24164#[doc = "ID: 400"]
24165#[derive(Debug, Clone, PartialEq)]
24166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24168#[cfg_attr(feature = "ts", derive(TS))]
24169#[cfg_attr(feature = "ts", ts(export))]
24170pub struct PLAY_TUNE_V2_DATA {
24171    #[doc = "Tune format"]
24172    pub format: TuneFormat,
24173    #[doc = "System ID"]
24174    pub target_system: u8,
24175    #[doc = "Component ID"]
24176    pub target_component: u8,
24177    #[doc = "Tune definition as a NULL-terminated string."]
24178    #[cfg_attr(feature = "ts", ts(type = "string"))]
24179    pub tune: CharArray<248>,
24180}
24181impl PLAY_TUNE_V2_DATA {
24182    pub const ENCODED_LEN: usize = 254usize;
24183    pub const DEFAULT: Self = Self {
24184        format: TuneFormat::DEFAULT,
24185        target_system: 0_u8,
24186        target_component: 0_u8,
24187        tune: CharArray::new([0_u8; 248usize]),
24188    };
24189    #[cfg(feature = "arbitrary")]
24190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24191        use arbitrary::{Arbitrary, Unstructured};
24192        let mut buf = [0u8; 1024];
24193        rng.fill_bytes(&mut buf);
24194        let mut unstructured = Unstructured::new(&buf);
24195        Self::arbitrary(&mut unstructured).unwrap_or_default()
24196    }
24197}
24198impl Default for PLAY_TUNE_V2_DATA {
24199    fn default() -> Self {
24200        Self::DEFAULT.clone()
24201    }
24202}
24203impl MessageData for PLAY_TUNE_V2_DATA {
24204    type Message = MavMessage;
24205    const ID: u32 = 400u32;
24206    const NAME: &'static str = "PLAY_TUNE_V2";
24207    const EXTRA_CRC: u8 = 110u8;
24208    const ENCODED_LEN: usize = 254usize;
24209    fn deser(
24210        _version: MavlinkVersion,
24211        __input: &[u8],
24212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24213        let avail_len = __input.len();
24214        let mut payload_buf = [0; Self::ENCODED_LEN];
24215        let mut buf = if avail_len < Self::ENCODED_LEN {
24216            payload_buf[0..avail_len].copy_from_slice(__input);
24217            Bytes::new(&payload_buf)
24218        } else {
24219            Bytes::new(__input)
24220        };
24221        let mut __struct = Self::default();
24222        let tmp = buf.get_u32_le();
24223        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24224            ::mavlink_core::error::ParserError::InvalidEnum {
24225                enum_type: "TuneFormat",
24226                value: tmp as u64,
24227            },
24228        )?;
24229        __struct.target_system = buf.get_u8();
24230        __struct.target_component = buf.get_u8();
24231        let mut tmp = [0_u8; 248usize];
24232        for v in &mut tmp {
24233            *v = buf.get_u8();
24234        }
24235        __struct.tune = CharArray::new(tmp);
24236        Ok(__struct)
24237    }
24238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24239        let mut __tmp = BytesMut::new(bytes);
24240        #[allow(clippy::absurd_extreme_comparisons)]
24241        #[allow(unused_comparisons)]
24242        if __tmp.remaining() < Self::ENCODED_LEN {
24243            panic!(
24244                "buffer is too small (need {} bytes, but got {})",
24245                Self::ENCODED_LEN,
24246                __tmp.remaining(),
24247            )
24248        }
24249        __tmp.put_u32_le(self.format as u32);
24250        __tmp.put_u8(self.target_system);
24251        __tmp.put_u8(self.target_component);
24252        for val in &self.tune {
24253            __tmp.put_u8(*val);
24254        }
24255        if matches!(version, MavlinkVersion::V2) {
24256            let len = __tmp.len();
24257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24258        } else {
24259            __tmp.len()
24260        }
24261    }
24262}
24263#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24264#[doc = ""]
24265#[doc = "ID: 87"]
24266#[derive(Debug, Clone, PartialEq)]
24267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24269#[cfg_attr(feature = "ts", derive(TS))]
24270#[cfg_attr(feature = "ts", ts(export))]
24271pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24272    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24273    pub time_boot_ms: u32,
24274    #[doc = "Latitude in WGS84 frame"]
24275    pub lat_int: i32,
24276    #[doc = "Longitude in WGS84 frame"]
24277    pub lon_int: i32,
24278    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24279    pub alt: f32,
24280    #[doc = "X velocity in NED frame"]
24281    pub vx: f32,
24282    #[doc = "Y velocity in NED frame"]
24283    pub vy: f32,
24284    #[doc = "Z velocity in NED frame"]
24285    pub vz: f32,
24286    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24287    pub afx: f32,
24288    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24289    pub afy: f32,
24290    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24291    pub afz: f32,
24292    #[doc = "yaw setpoint"]
24293    pub yaw: f32,
24294    #[doc = "yaw rate setpoint"]
24295    pub yaw_rate: f32,
24296    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24297    pub type_mask: PositionTargetTypemask,
24298    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24299    pub coordinate_frame: MavFrame,
24300}
24301impl POSITION_TARGET_GLOBAL_INT_DATA {
24302    pub const ENCODED_LEN: usize = 51usize;
24303    pub const DEFAULT: Self = Self {
24304        time_boot_ms: 0_u32,
24305        lat_int: 0_i32,
24306        lon_int: 0_i32,
24307        alt: 0.0_f32,
24308        vx: 0.0_f32,
24309        vy: 0.0_f32,
24310        vz: 0.0_f32,
24311        afx: 0.0_f32,
24312        afy: 0.0_f32,
24313        afz: 0.0_f32,
24314        yaw: 0.0_f32,
24315        yaw_rate: 0.0_f32,
24316        type_mask: PositionTargetTypemask::DEFAULT,
24317        coordinate_frame: MavFrame::DEFAULT,
24318    };
24319    #[cfg(feature = "arbitrary")]
24320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24321        use arbitrary::{Arbitrary, Unstructured};
24322        let mut buf = [0u8; 1024];
24323        rng.fill_bytes(&mut buf);
24324        let mut unstructured = Unstructured::new(&buf);
24325        Self::arbitrary(&mut unstructured).unwrap_or_default()
24326    }
24327}
24328impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24329    fn default() -> Self {
24330        Self::DEFAULT.clone()
24331    }
24332}
24333impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24334    type Message = MavMessage;
24335    const ID: u32 = 87u32;
24336    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24337    const EXTRA_CRC: u8 = 150u8;
24338    const ENCODED_LEN: usize = 51usize;
24339    fn deser(
24340        _version: MavlinkVersion,
24341        __input: &[u8],
24342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24343        let avail_len = __input.len();
24344        let mut payload_buf = [0; Self::ENCODED_LEN];
24345        let mut buf = if avail_len < Self::ENCODED_LEN {
24346            payload_buf[0..avail_len].copy_from_slice(__input);
24347            Bytes::new(&payload_buf)
24348        } else {
24349            Bytes::new(__input)
24350        };
24351        let mut __struct = Self::default();
24352        __struct.time_boot_ms = buf.get_u32_le();
24353        __struct.lat_int = buf.get_i32_le();
24354        __struct.lon_int = buf.get_i32_le();
24355        __struct.alt = buf.get_f32_le();
24356        __struct.vx = buf.get_f32_le();
24357        __struct.vy = buf.get_f32_le();
24358        __struct.vz = buf.get_f32_le();
24359        __struct.afx = buf.get_f32_le();
24360        __struct.afy = buf.get_f32_le();
24361        __struct.afz = buf.get_f32_le();
24362        __struct.yaw = buf.get_f32_le();
24363        __struct.yaw_rate = buf.get_f32_le();
24364        let tmp = buf.get_u16_le();
24365        __struct.type_mask =
24366            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24367                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24368                    flag_type: "PositionTargetTypemask",
24369                    value: tmp as u64,
24370                })?;
24371        let tmp = buf.get_u8();
24372        __struct.coordinate_frame =
24373            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24374                enum_type: "MavFrame",
24375                value: tmp as u64,
24376            })?;
24377        Ok(__struct)
24378    }
24379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24380        let mut __tmp = BytesMut::new(bytes);
24381        #[allow(clippy::absurd_extreme_comparisons)]
24382        #[allow(unused_comparisons)]
24383        if __tmp.remaining() < Self::ENCODED_LEN {
24384            panic!(
24385                "buffer is too small (need {} bytes, but got {})",
24386                Self::ENCODED_LEN,
24387                __tmp.remaining(),
24388            )
24389        }
24390        __tmp.put_u32_le(self.time_boot_ms);
24391        __tmp.put_i32_le(self.lat_int);
24392        __tmp.put_i32_le(self.lon_int);
24393        __tmp.put_f32_le(self.alt);
24394        __tmp.put_f32_le(self.vx);
24395        __tmp.put_f32_le(self.vy);
24396        __tmp.put_f32_le(self.vz);
24397        __tmp.put_f32_le(self.afx);
24398        __tmp.put_f32_le(self.afy);
24399        __tmp.put_f32_le(self.afz);
24400        __tmp.put_f32_le(self.yaw);
24401        __tmp.put_f32_le(self.yaw_rate);
24402        __tmp.put_u16_le(self.type_mask.bits() as u16);
24403        __tmp.put_u8(self.coordinate_frame as u8);
24404        if matches!(version, MavlinkVersion::V2) {
24405            let len = __tmp.len();
24406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24407        } else {
24408            __tmp.len()
24409        }
24410    }
24411}
24412#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24413#[doc = ""]
24414#[doc = "ID: 85"]
24415#[derive(Debug, Clone, PartialEq)]
24416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24418#[cfg_attr(feature = "ts", derive(TS))]
24419#[cfg_attr(feature = "ts", ts(export))]
24420pub struct POSITION_TARGET_LOCAL_NED_DATA {
24421    #[doc = "Timestamp (time since system boot)."]
24422    pub time_boot_ms: u32,
24423    #[doc = "X Position in NED frame"]
24424    pub x: f32,
24425    #[doc = "Y Position in NED frame"]
24426    pub y: f32,
24427    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24428    pub z: f32,
24429    #[doc = "X velocity in NED frame"]
24430    pub vx: f32,
24431    #[doc = "Y velocity in NED frame"]
24432    pub vy: f32,
24433    #[doc = "Z velocity in NED frame"]
24434    pub vz: f32,
24435    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24436    pub afx: f32,
24437    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24438    pub afy: f32,
24439    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24440    pub afz: f32,
24441    #[doc = "yaw setpoint"]
24442    pub yaw: f32,
24443    #[doc = "yaw rate setpoint"]
24444    pub yaw_rate: f32,
24445    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24446    pub type_mask: PositionTargetTypemask,
24447    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24448    pub coordinate_frame: MavFrame,
24449}
24450impl POSITION_TARGET_LOCAL_NED_DATA {
24451    pub const ENCODED_LEN: usize = 51usize;
24452    pub const DEFAULT: Self = Self {
24453        time_boot_ms: 0_u32,
24454        x: 0.0_f32,
24455        y: 0.0_f32,
24456        z: 0.0_f32,
24457        vx: 0.0_f32,
24458        vy: 0.0_f32,
24459        vz: 0.0_f32,
24460        afx: 0.0_f32,
24461        afy: 0.0_f32,
24462        afz: 0.0_f32,
24463        yaw: 0.0_f32,
24464        yaw_rate: 0.0_f32,
24465        type_mask: PositionTargetTypemask::DEFAULT,
24466        coordinate_frame: MavFrame::DEFAULT,
24467    };
24468    #[cfg(feature = "arbitrary")]
24469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24470        use arbitrary::{Arbitrary, Unstructured};
24471        let mut buf = [0u8; 1024];
24472        rng.fill_bytes(&mut buf);
24473        let mut unstructured = Unstructured::new(&buf);
24474        Self::arbitrary(&mut unstructured).unwrap_or_default()
24475    }
24476}
24477impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24478    fn default() -> Self {
24479        Self::DEFAULT.clone()
24480    }
24481}
24482impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24483    type Message = MavMessage;
24484    const ID: u32 = 85u32;
24485    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24486    const EXTRA_CRC: u8 = 140u8;
24487    const ENCODED_LEN: usize = 51usize;
24488    fn deser(
24489        _version: MavlinkVersion,
24490        __input: &[u8],
24491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24492        let avail_len = __input.len();
24493        let mut payload_buf = [0; Self::ENCODED_LEN];
24494        let mut buf = if avail_len < Self::ENCODED_LEN {
24495            payload_buf[0..avail_len].copy_from_slice(__input);
24496            Bytes::new(&payload_buf)
24497        } else {
24498            Bytes::new(__input)
24499        };
24500        let mut __struct = Self::default();
24501        __struct.time_boot_ms = buf.get_u32_le();
24502        __struct.x = buf.get_f32_le();
24503        __struct.y = buf.get_f32_le();
24504        __struct.z = buf.get_f32_le();
24505        __struct.vx = buf.get_f32_le();
24506        __struct.vy = buf.get_f32_le();
24507        __struct.vz = buf.get_f32_le();
24508        __struct.afx = buf.get_f32_le();
24509        __struct.afy = buf.get_f32_le();
24510        __struct.afz = buf.get_f32_le();
24511        __struct.yaw = buf.get_f32_le();
24512        __struct.yaw_rate = buf.get_f32_le();
24513        let tmp = buf.get_u16_le();
24514        __struct.type_mask =
24515            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24516                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24517                    flag_type: "PositionTargetTypemask",
24518                    value: tmp as u64,
24519                })?;
24520        let tmp = buf.get_u8();
24521        __struct.coordinate_frame =
24522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24523                enum_type: "MavFrame",
24524                value: tmp as u64,
24525            })?;
24526        Ok(__struct)
24527    }
24528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24529        let mut __tmp = BytesMut::new(bytes);
24530        #[allow(clippy::absurd_extreme_comparisons)]
24531        #[allow(unused_comparisons)]
24532        if __tmp.remaining() < Self::ENCODED_LEN {
24533            panic!(
24534                "buffer is too small (need {} bytes, but got {})",
24535                Self::ENCODED_LEN,
24536                __tmp.remaining(),
24537            )
24538        }
24539        __tmp.put_u32_le(self.time_boot_ms);
24540        __tmp.put_f32_le(self.x);
24541        __tmp.put_f32_le(self.y);
24542        __tmp.put_f32_le(self.z);
24543        __tmp.put_f32_le(self.vx);
24544        __tmp.put_f32_le(self.vy);
24545        __tmp.put_f32_le(self.vz);
24546        __tmp.put_f32_le(self.afx);
24547        __tmp.put_f32_le(self.afy);
24548        __tmp.put_f32_le(self.afz);
24549        __tmp.put_f32_le(self.yaw);
24550        __tmp.put_f32_le(self.yaw_rate);
24551        __tmp.put_u16_le(self.type_mask.bits() as u16);
24552        __tmp.put_u8(self.coordinate_frame as u8);
24553        if matches!(version, MavlinkVersion::V2) {
24554            let len = __tmp.len();
24555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24556        } else {
24557            __tmp.len()
24558        }
24559    }
24560}
24561#[doc = "Power supply status."]
24562#[doc = ""]
24563#[doc = "ID: 125"]
24564#[derive(Debug, Clone, PartialEq)]
24565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24567#[cfg_attr(feature = "ts", derive(TS))]
24568#[cfg_attr(feature = "ts", ts(export))]
24569pub struct POWER_STATUS_DATA {
24570    #[doc = "5V rail voltage."]
24571    pub Vcc: u16,
24572    #[doc = "Servo rail voltage."]
24573    pub Vservo: u16,
24574    #[doc = "Bitmap of power supply status flags."]
24575    pub flags: MavPowerStatus,
24576}
24577impl POWER_STATUS_DATA {
24578    pub const ENCODED_LEN: usize = 6usize;
24579    pub const DEFAULT: Self = Self {
24580        Vcc: 0_u16,
24581        Vservo: 0_u16,
24582        flags: MavPowerStatus::DEFAULT,
24583    };
24584    #[cfg(feature = "arbitrary")]
24585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24586        use arbitrary::{Arbitrary, Unstructured};
24587        let mut buf = [0u8; 1024];
24588        rng.fill_bytes(&mut buf);
24589        let mut unstructured = Unstructured::new(&buf);
24590        Self::arbitrary(&mut unstructured).unwrap_or_default()
24591    }
24592}
24593impl Default for POWER_STATUS_DATA {
24594    fn default() -> Self {
24595        Self::DEFAULT.clone()
24596    }
24597}
24598impl MessageData for POWER_STATUS_DATA {
24599    type Message = MavMessage;
24600    const ID: u32 = 125u32;
24601    const NAME: &'static str = "POWER_STATUS";
24602    const EXTRA_CRC: u8 = 203u8;
24603    const ENCODED_LEN: usize = 6usize;
24604    fn deser(
24605        _version: MavlinkVersion,
24606        __input: &[u8],
24607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24608        let avail_len = __input.len();
24609        let mut payload_buf = [0; Self::ENCODED_LEN];
24610        let mut buf = if avail_len < Self::ENCODED_LEN {
24611            payload_buf[0..avail_len].copy_from_slice(__input);
24612            Bytes::new(&payload_buf)
24613        } else {
24614            Bytes::new(__input)
24615        };
24616        let mut __struct = Self::default();
24617        __struct.Vcc = buf.get_u16_le();
24618        __struct.Vservo = buf.get_u16_le();
24619        let tmp = buf.get_u16_le();
24620        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
24621            ::mavlink_core::error::ParserError::InvalidFlag {
24622                flag_type: "MavPowerStatus",
24623                value: tmp as u64,
24624            },
24625        )?;
24626        Ok(__struct)
24627    }
24628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24629        let mut __tmp = BytesMut::new(bytes);
24630        #[allow(clippy::absurd_extreme_comparisons)]
24631        #[allow(unused_comparisons)]
24632        if __tmp.remaining() < Self::ENCODED_LEN {
24633            panic!(
24634                "buffer is too small (need {} bytes, but got {})",
24635                Self::ENCODED_LEN,
24636                __tmp.remaining(),
24637            )
24638        }
24639        __tmp.put_u16_le(self.Vcc);
24640        __tmp.put_u16_le(self.Vservo);
24641        __tmp.put_u16_le(self.flags.bits() as u16);
24642        if matches!(version, MavlinkVersion::V2) {
24643            let len = __tmp.len();
24644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24645        } else {
24646            __tmp.len()
24647        }
24648    }
24649}
24650#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24651#[doc = ""]
24652#[doc = "ID: 300"]
24653#[derive(Debug, Clone, PartialEq)]
24654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24656#[cfg_attr(feature = "ts", derive(TS))]
24657#[cfg_attr(feature = "ts", ts(export))]
24658pub struct PROTOCOL_VERSION_DATA {
24659    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24660    pub version: u16,
24661    #[doc = "Minimum MAVLink version supported"]
24662    pub min_version: u16,
24663    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24664    pub max_version: u16,
24665    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24667    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24668    pub spec_version_hash: [u8; 8],
24669    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24671    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24672    pub library_version_hash: [u8; 8],
24673}
24674impl PROTOCOL_VERSION_DATA {
24675    pub const ENCODED_LEN: usize = 22usize;
24676    pub const DEFAULT: Self = Self {
24677        version: 0_u16,
24678        min_version: 0_u16,
24679        max_version: 0_u16,
24680        spec_version_hash: [0_u8; 8usize],
24681        library_version_hash: [0_u8; 8usize],
24682    };
24683    #[cfg(feature = "arbitrary")]
24684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24685        use arbitrary::{Arbitrary, Unstructured};
24686        let mut buf = [0u8; 1024];
24687        rng.fill_bytes(&mut buf);
24688        let mut unstructured = Unstructured::new(&buf);
24689        Self::arbitrary(&mut unstructured).unwrap_or_default()
24690    }
24691}
24692impl Default for PROTOCOL_VERSION_DATA {
24693    fn default() -> Self {
24694        Self::DEFAULT.clone()
24695    }
24696}
24697impl MessageData for PROTOCOL_VERSION_DATA {
24698    type Message = MavMessage;
24699    const ID: u32 = 300u32;
24700    const NAME: &'static str = "PROTOCOL_VERSION";
24701    const EXTRA_CRC: u8 = 217u8;
24702    const ENCODED_LEN: usize = 22usize;
24703    fn deser(
24704        _version: MavlinkVersion,
24705        __input: &[u8],
24706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24707        let avail_len = __input.len();
24708        let mut payload_buf = [0; Self::ENCODED_LEN];
24709        let mut buf = if avail_len < Self::ENCODED_LEN {
24710            payload_buf[0..avail_len].copy_from_slice(__input);
24711            Bytes::new(&payload_buf)
24712        } else {
24713            Bytes::new(__input)
24714        };
24715        let mut __struct = Self::default();
24716        __struct.version = buf.get_u16_le();
24717        __struct.min_version = buf.get_u16_le();
24718        __struct.max_version = buf.get_u16_le();
24719        for v in &mut __struct.spec_version_hash {
24720            let val = buf.get_u8();
24721            *v = val;
24722        }
24723        for v in &mut __struct.library_version_hash {
24724            let val = buf.get_u8();
24725            *v = val;
24726        }
24727        Ok(__struct)
24728    }
24729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24730        let mut __tmp = BytesMut::new(bytes);
24731        #[allow(clippy::absurd_extreme_comparisons)]
24732        #[allow(unused_comparisons)]
24733        if __tmp.remaining() < Self::ENCODED_LEN {
24734            panic!(
24735                "buffer is too small (need {} bytes, but got {})",
24736                Self::ENCODED_LEN,
24737                __tmp.remaining(),
24738            )
24739        }
24740        __tmp.put_u16_le(self.version);
24741        __tmp.put_u16_le(self.min_version);
24742        __tmp.put_u16_le(self.max_version);
24743        for val in &self.spec_version_hash {
24744            __tmp.put_u8(*val);
24745        }
24746        for val in &self.library_version_hash {
24747            __tmp.put_u8(*val);
24748        }
24749        if matches!(version, MavlinkVersion::V2) {
24750            let len = __tmp.len();
24751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24752        } else {
24753            __tmp.len()
24754        }
24755    }
24756}
24757#[doc = "Status generated by radio and injected into MAVLink stream."]
24758#[doc = ""]
24759#[doc = "ID: 109"]
24760#[derive(Debug, Clone, PartialEq)]
24761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24763#[cfg_attr(feature = "ts", derive(TS))]
24764#[cfg_attr(feature = "ts", ts(export))]
24765pub struct RADIO_STATUS_DATA {
24766    #[doc = "Count of radio packet receive errors (since boot)."]
24767    pub rxerrors: u16,
24768    #[doc = "Count of error corrected radio packets (since boot)."]
24769    pub fixed: u16,
24770    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24771    pub rssi: u8,
24772    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24773    pub remrssi: u8,
24774    #[doc = "Remaining free transmitter buffer space."]
24775    pub txbuf: u8,
24776    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24777    pub noise: u8,
24778    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24779    pub remnoise: u8,
24780}
24781impl RADIO_STATUS_DATA {
24782    pub const ENCODED_LEN: usize = 9usize;
24783    pub const DEFAULT: Self = Self {
24784        rxerrors: 0_u16,
24785        fixed: 0_u16,
24786        rssi: 0_u8,
24787        remrssi: 0_u8,
24788        txbuf: 0_u8,
24789        noise: 0_u8,
24790        remnoise: 0_u8,
24791    };
24792    #[cfg(feature = "arbitrary")]
24793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24794        use arbitrary::{Arbitrary, Unstructured};
24795        let mut buf = [0u8; 1024];
24796        rng.fill_bytes(&mut buf);
24797        let mut unstructured = Unstructured::new(&buf);
24798        Self::arbitrary(&mut unstructured).unwrap_or_default()
24799    }
24800}
24801impl Default for RADIO_STATUS_DATA {
24802    fn default() -> Self {
24803        Self::DEFAULT.clone()
24804    }
24805}
24806impl MessageData for RADIO_STATUS_DATA {
24807    type Message = MavMessage;
24808    const ID: u32 = 109u32;
24809    const NAME: &'static str = "RADIO_STATUS";
24810    const EXTRA_CRC: u8 = 185u8;
24811    const ENCODED_LEN: usize = 9usize;
24812    fn deser(
24813        _version: MavlinkVersion,
24814        __input: &[u8],
24815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24816        let avail_len = __input.len();
24817        let mut payload_buf = [0; Self::ENCODED_LEN];
24818        let mut buf = if avail_len < Self::ENCODED_LEN {
24819            payload_buf[0..avail_len].copy_from_slice(__input);
24820            Bytes::new(&payload_buf)
24821        } else {
24822            Bytes::new(__input)
24823        };
24824        let mut __struct = Self::default();
24825        __struct.rxerrors = buf.get_u16_le();
24826        __struct.fixed = buf.get_u16_le();
24827        __struct.rssi = buf.get_u8();
24828        __struct.remrssi = buf.get_u8();
24829        __struct.txbuf = buf.get_u8();
24830        __struct.noise = buf.get_u8();
24831        __struct.remnoise = buf.get_u8();
24832        Ok(__struct)
24833    }
24834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24835        let mut __tmp = BytesMut::new(bytes);
24836        #[allow(clippy::absurd_extreme_comparisons)]
24837        #[allow(unused_comparisons)]
24838        if __tmp.remaining() < Self::ENCODED_LEN {
24839            panic!(
24840                "buffer is too small (need {} bytes, but got {})",
24841                Self::ENCODED_LEN,
24842                __tmp.remaining(),
24843            )
24844        }
24845        __tmp.put_u16_le(self.rxerrors);
24846        __tmp.put_u16_le(self.fixed);
24847        __tmp.put_u8(self.rssi);
24848        __tmp.put_u8(self.remrssi);
24849        __tmp.put_u8(self.txbuf);
24850        __tmp.put_u8(self.noise);
24851        __tmp.put_u8(self.remnoise);
24852        if matches!(version, MavlinkVersion::V2) {
24853            let len = __tmp.len();
24854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24855        } else {
24856            __tmp.len()
24857        }
24858    }
24859}
24860#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24861#[doc = ""]
24862#[doc = "ID: 27"]
24863#[derive(Debug, Clone, PartialEq)]
24864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24866#[cfg_attr(feature = "ts", derive(TS))]
24867#[cfg_attr(feature = "ts", ts(export))]
24868pub struct RAW_IMU_DATA {
24869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24870    pub time_usec: u64,
24871    #[doc = "X acceleration (raw)"]
24872    pub xacc: i16,
24873    #[doc = "Y acceleration (raw)"]
24874    pub yacc: i16,
24875    #[doc = "Z acceleration (raw)"]
24876    pub zacc: i16,
24877    #[doc = "Angular speed around X axis (raw)"]
24878    pub xgyro: i16,
24879    #[doc = "Angular speed around Y axis (raw)"]
24880    pub ygyro: i16,
24881    #[doc = "Angular speed around Z axis (raw)"]
24882    pub zgyro: i16,
24883    #[doc = "X Magnetic field (raw)"]
24884    pub xmag: i16,
24885    #[doc = "Y Magnetic field (raw)"]
24886    pub ymag: i16,
24887    #[doc = "Z Magnetic field (raw)"]
24888    pub zmag: i16,
24889    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24891    pub id: u8,
24892    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24894    pub temperature: i16,
24895}
24896impl RAW_IMU_DATA {
24897    pub const ENCODED_LEN: usize = 29usize;
24898    pub const DEFAULT: Self = Self {
24899        time_usec: 0_u64,
24900        xacc: 0_i16,
24901        yacc: 0_i16,
24902        zacc: 0_i16,
24903        xgyro: 0_i16,
24904        ygyro: 0_i16,
24905        zgyro: 0_i16,
24906        xmag: 0_i16,
24907        ymag: 0_i16,
24908        zmag: 0_i16,
24909        id: 0_u8,
24910        temperature: 0_i16,
24911    };
24912    #[cfg(feature = "arbitrary")]
24913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24914        use arbitrary::{Arbitrary, Unstructured};
24915        let mut buf = [0u8; 1024];
24916        rng.fill_bytes(&mut buf);
24917        let mut unstructured = Unstructured::new(&buf);
24918        Self::arbitrary(&mut unstructured).unwrap_or_default()
24919    }
24920}
24921impl Default for RAW_IMU_DATA {
24922    fn default() -> Self {
24923        Self::DEFAULT.clone()
24924    }
24925}
24926impl MessageData for RAW_IMU_DATA {
24927    type Message = MavMessage;
24928    const ID: u32 = 27u32;
24929    const NAME: &'static str = "RAW_IMU";
24930    const EXTRA_CRC: u8 = 144u8;
24931    const ENCODED_LEN: usize = 29usize;
24932    fn deser(
24933        _version: MavlinkVersion,
24934        __input: &[u8],
24935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24936        let avail_len = __input.len();
24937        let mut payload_buf = [0; Self::ENCODED_LEN];
24938        let mut buf = if avail_len < Self::ENCODED_LEN {
24939            payload_buf[0..avail_len].copy_from_slice(__input);
24940            Bytes::new(&payload_buf)
24941        } else {
24942            Bytes::new(__input)
24943        };
24944        let mut __struct = Self::default();
24945        __struct.time_usec = buf.get_u64_le();
24946        __struct.xacc = buf.get_i16_le();
24947        __struct.yacc = buf.get_i16_le();
24948        __struct.zacc = buf.get_i16_le();
24949        __struct.xgyro = buf.get_i16_le();
24950        __struct.ygyro = buf.get_i16_le();
24951        __struct.zgyro = buf.get_i16_le();
24952        __struct.xmag = buf.get_i16_le();
24953        __struct.ymag = buf.get_i16_le();
24954        __struct.zmag = buf.get_i16_le();
24955        __struct.id = buf.get_u8();
24956        __struct.temperature = buf.get_i16_le();
24957        Ok(__struct)
24958    }
24959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24960        let mut __tmp = BytesMut::new(bytes);
24961        #[allow(clippy::absurd_extreme_comparisons)]
24962        #[allow(unused_comparisons)]
24963        if __tmp.remaining() < Self::ENCODED_LEN {
24964            panic!(
24965                "buffer is too small (need {} bytes, but got {})",
24966                Self::ENCODED_LEN,
24967                __tmp.remaining(),
24968            )
24969        }
24970        __tmp.put_u64_le(self.time_usec);
24971        __tmp.put_i16_le(self.xacc);
24972        __tmp.put_i16_le(self.yacc);
24973        __tmp.put_i16_le(self.zacc);
24974        __tmp.put_i16_le(self.xgyro);
24975        __tmp.put_i16_le(self.ygyro);
24976        __tmp.put_i16_le(self.zgyro);
24977        __tmp.put_i16_le(self.xmag);
24978        __tmp.put_i16_le(self.ymag);
24979        __tmp.put_i16_le(self.zmag);
24980        if matches!(version, MavlinkVersion::V2) {
24981            __tmp.put_u8(self.id);
24982            __tmp.put_i16_le(self.temperature);
24983            let len = __tmp.len();
24984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24985        } else {
24986            __tmp.len()
24987        }
24988    }
24989}
24990#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24991#[doc = ""]
24992#[doc = "ID: 28"]
24993#[derive(Debug, Clone, PartialEq)]
24994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24996#[cfg_attr(feature = "ts", derive(TS))]
24997#[cfg_attr(feature = "ts", ts(export))]
24998pub struct RAW_PRESSURE_DATA {
24999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25000    pub time_usec: u64,
25001    #[doc = "Absolute pressure (raw)"]
25002    pub press_abs: i16,
25003    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25004    pub press_diff1: i16,
25005    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25006    pub press_diff2: i16,
25007    #[doc = "Raw Temperature measurement (raw)"]
25008    pub temperature: i16,
25009}
25010impl RAW_PRESSURE_DATA {
25011    pub const ENCODED_LEN: usize = 16usize;
25012    pub const DEFAULT: Self = Self {
25013        time_usec: 0_u64,
25014        press_abs: 0_i16,
25015        press_diff1: 0_i16,
25016        press_diff2: 0_i16,
25017        temperature: 0_i16,
25018    };
25019    #[cfg(feature = "arbitrary")]
25020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25021        use arbitrary::{Arbitrary, Unstructured};
25022        let mut buf = [0u8; 1024];
25023        rng.fill_bytes(&mut buf);
25024        let mut unstructured = Unstructured::new(&buf);
25025        Self::arbitrary(&mut unstructured).unwrap_or_default()
25026    }
25027}
25028impl Default for RAW_PRESSURE_DATA {
25029    fn default() -> Self {
25030        Self::DEFAULT.clone()
25031    }
25032}
25033impl MessageData for RAW_PRESSURE_DATA {
25034    type Message = MavMessage;
25035    const ID: u32 = 28u32;
25036    const NAME: &'static str = "RAW_PRESSURE";
25037    const EXTRA_CRC: u8 = 67u8;
25038    const ENCODED_LEN: usize = 16usize;
25039    fn deser(
25040        _version: MavlinkVersion,
25041        __input: &[u8],
25042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25043        let avail_len = __input.len();
25044        let mut payload_buf = [0; Self::ENCODED_LEN];
25045        let mut buf = if avail_len < Self::ENCODED_LEN {
25046            payload_buf[0..avail_len].copy_from_slice(__input);
25047            Bytes::new(&payload_buf)
25048        } else {
25049            Bytes::new(__input)
25050        };
25051        let mut __struct = Self::default();
25052        __struct.time_usec = buf.get_u64_le();
25053        __struct.press_abs = buf.get_i16_le();
25054        __struct.press_diff1 = buf.get_i16_le();
25055        __struct.press_diff2 = buf.get_i16_le();
25056        __struct.temperature = buf.get_i16_le();
25057        Ok(__struct)
25058    }
25059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25060        let mut __tmp = BytesMut::new(bytes);
25061        #[allow(clippy::absurd_extreme_comparisons)]
25062        #[allow(unused_comparisons)]
25063        if __tmp.remaining() < Self::ENCODED_LEN {
25064            panic!(
25065                "buffer is too small (need {} bytes, but got {})",
25066                Self::ENCODED_LEN,
25067                __tmp.remaining(),
25068            )
25069        }
25070        __tmp.put_u64_le(self.time_usec);
25071        __tmp.put_i16_le(self.press_abs);
25072        __tmp.put_i16_le(self.press_diff1);
25073        __tmp.put_i16_le(self.press_diff2);
25074        __tmp.put_i16_le(self.temperature);
25075        if matches!(version, MavlinkVersion::V2) {
25076            let len = __tmp.len();
25077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25078        } else {
25079            __tmp.len()
25080        }
25081    }
25082}
25083#[doc = "RPM sensor data message."]
25084#[doc = ""]
25085#[doc = "ID: 339"]
25086#[derive(Debug, Clone, PartialEq)]
25087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25089#[cfg_attr(feature = "ts", derive(TS))]
25090#[cfg_attr(feature = "ts", ts(export))]
25091pub struct RAW_RPM_DATA {
25092    #[doc = "Indicated rate"]
25093    pub frequency: f32,
25094    #[doc = "Index of this RPM sensor (0-indexed)"]
25095    pub index: u8,
25096}
25097impl RAW_RPM_DATA {
25098    pub const ENCODED_LEN: usize = 5usize;
25099    pub const DEFAULT: Self = Self {
25100        frequency: 0.0_f32,
25101        index: 0_u8,
25102    };
25103    #[cfg(feature = "arbitrary")]
25104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25105        use arbitrary::{Arbitrary, Unstructured};
25106        let mut buf = [0u8; 1024];
25107        rng.fill_bytes(&mut buf);
25108        let mut unstructured = Unstructured::new(&buf);
25109        Self::arbitrary(&mut unstructured).unwrap_or_default()
25110    }
25111}
25112impl Default for RAW_RPM_DATA {
25113    fn default() -> Self {
25114        Self::DEFAULT.clone()
25115    }
25116}
25117impl MessageData for RAW_RPM_DATA {
25118    type Message = MavMessage;
25119    const ID: u32 = 339u32;
25120    const NAME: &'static str = "RAW_RPM";
25121    const EXTRA_CRC: u8 = 199u8;
25122    const ENCODED_LEN: usize = 5usize;
25123    fn deser(
25124        _version: MavlinkVersion,
25125        __input: &[u8],
25126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25127        let avail_len = __input.len();
25128        let mut payload_buf = [0; Self::ENCODED_LEN];
25129        let mut buf = if avail_len < Self::ENCODED_LEN {
25130            payload_buf[0..avail_len].copy_from_slice(__input);
25131            Bytes::new(&payload_buf)
25132        } else {
25133            Bytes::new(__input)
25134        };
25135        let mut __struct = Self::default();
25136        __struct.frequency = buf.get_f32_le();
25137        __struct.index = buf.get_u8();
25138        Ok(__struct)
25139    }
25140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25141        let mut __tmp = BytesMut::new(bytes);
25142        #[allow(clippy::absurd_extreme_comparisons)]
25143        #[allow(unused_comparisons)]
25144        if __tmp.remaining() < Self::ENCODED_LEN {
25145            panic!(
25146                "buffer is too small (need {} bytes, but got {})",
25147                Self::ENCODED_LEN,
25148                __tmp.remaining(),
25149            )
25150        }
25151        __tmp.put_f32_le(self.frequency);
25152        __tmp.put_u8(self.index);
25153        if matches!(version, MavlinkVersion::V2) {
25154            let len = __tmp.len();
25155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25156        } else {
25157            __tmp.len()
25158        }
25159    }
25160}
25161#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25162#[doc = ""]
25163#[doc = "ID: 65"]
25164#[derive(Debug, Clone, PartialEq)]
25165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25167#[cfg_attr(feature = "ts", derive(TS))]
25168#[cfg_attr(feature = "ts", ts(export))]
25169pub struct RC_CHANNELS_DATA {
25170    #[doc = "Timestamp (time since system boot)."]
25171    pub time_boot_ms: u32,
25172    #[doc = "RC channel 1 value."]
25173    pub chan1_raw: u16,
25174    #[doc = "RC channel 2 value."]
25175    pub chan2_raw: u16,
25176    #[doc = "RC channel 3 value."]
25177    pub chan3_raw: u16,
25178    #[doc = "RC channel 4 value."]
25179    pub chan4_raw: u16,
25180    #[doc = "RC channel 5 value."]
25181    pub chan5_raw: u16,
25182    #[doc = "RC channel 6 value."]
25183    pub chan6_raw: u16,
25184    #[doc = "RC channel 7 value."]
25185    pub chan7_raw: u16,
25186    #[doc = "RC channel 8 value."]
25187    pub chan8_raw: u16,
25188    #[doc = "RC channel 9 value."]
25189    pub chan9_raw: u16,
25190    #[doc = "RC channel 10 value."]
25191    pub chan10_raw: u16,
25192    #[doc = "RC channel 11 value."]
25193    pub chan11_raw: u16,
25194    #[doc = "RC channel 12 value."]
25195    pub chan12_raw: u16,
25196    #[doc = "RC channel 13 value."]
25197    pub chan13_raw: u16,
25198    #[doc = "RC channel 14 value."]
25199    pub chan14_raw: u16,
25200    #[doc = "RC channel 15 value."]
25201    pub chan15_raw: u16,
25202    #[doc = "RC channel 16 value."]
25203    pub chan16_raw: u16,
25204    #[doc = "RC channel 17 value."]
25205    pub chan17_raw: u16,
25206    #[doc = "RC channel 18 value."]
25207    pub chan18_raw: u16,
25208    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25209    pub chancount: u8,
25210    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25211    pub rssi: u8,
25212}
25213impl RC_CHANNELS_DATA {
25214    pub const ENCODED_LEN: usize = 42usize;
25215    pub const DEFAULT: Self = Self {
25216        time_boot_ms: 0_u32,
25217        chan1_raw: 0_u16,
25218        chan2_raw: 0_u16,
25219        chan3_raw: 0_u16,
25220        chan4_raw: 0_u16,
25221        chan5_raw: 0_u16,
25222        chan6_raw: 0_u16,
25223        chan7_raw: 0_u16,
25224        chan8_raw: 0_u16,
25225        chan9_raw: 0_u16,
25226        chan10_raw: 0_u16,
25227        chan11_raw: 0_u16,
25228        chan12_raw: 0_u16,
25229        chan13_raw: 0_u16,
25230        chan14_raw: 0_u16,
25231        chan15_raw: 0_u16,
25232        chan16_raw: 0_u16,
25233        chan17_raw: 0_u16,
25234        chan18_raw: 0_u16,
25235        chancount: 0_u8,
25236        rssi: 0_u8,
25237    };
25238    #[cfg(feature = "arbitrary")]
25239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25240        use arbitrary::{Arbitrary, Unstructured};
25241        let mut buf = [0u8; 1024];
25242        rng.fill_bytes(&mut buf);
25243        let mut unstructured = Unstructured::new(&buf);
25244        Self::arbitrary(&mut unstructured).unwrap_or_default()
25245    }
25246}
25247impl Default for RC_CHANNELS_DATA {
25248    fn default() -> Self {
25249        Self::DEFAULT.clone()
25250    }
25251}
25252impl MessageData for RC_CHANNELS_DATA {
25253    type Message = MavMessage;
25254    const ID: u32 = 65u32;
25255    const NAME: &'static str = "RC_CHANNELS";
25256    const EXTRA_CRC: u8 = 118u8;
25257    const ENCODED_LEN: usize = 42usize;
25258    fn deser(
25259        _version: MavlinkVersion,
25260        __input: &[u8],
25261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25262        let avail_len = __input.len();
25263        let mut payload_buf = [0; Self::ENCODED_LEN];
25264        let mut buf = if avail_len < Self::ENCODED_LEN {
25265            payload_buf[0..avail_len].copy_from_slice(__input);
25266            Bytes::new(&payload_buf)
25267        } else {
25268            Bytes::new(__input)
25269        };
25270        let mut __struct = Self::default();
25271        __struct.time_boot_ms = buf.get_u32_le();
25272        __struct.chan1_raw = buf.get_u16_le();
25273        __struct.chan2_raw = buf.get_u16_le();
25274        __struct.chan3_raw = buf.get_u16_le();
25275        __struct.chan4_raw = buf.get_u16_le();
25276        __struct.chan5_raw = buf.get_u16_le();
25277        __struct.chan6_raw = buf.get_u16_le();
25278        __struct.chan7_raw = buf.get_u16_le();
25279        __struct.chan8_raw = buf.get_u16_le();
25280        __struct.chan9_raw = buf.get_u16_le();
25281        __struct.chan10_raw = buf.get_u16_le();
25282        __struct.chan11_raw = buf.get_u16_le();
25283        __struct.chan12_raw = buf.get_u16_le();
25284        __struct.chan13_raw = buf.get_u16_le();
25285        __struct.chan14_raw = buf.get_u16_le();
25286        __struct.chan15_raw = buf.get_u16_le();
25287        __struct.chan16_raw = buf.get_u16_le();
25288        __struct.chan17_raw = buf.get_u16_le();
25289        __struct.chan18_raw = buf.get_u16_le();
25290        __struct.chancount = buf.get_u8();
25291        __struct.rssi = buf.get_u8();
25292        Ok(__struct)
25293    }
25294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25295        let mut __tmp = BytesMut::new(bytes);
25296        #[allow(clippy::absurd_extreme_comparisons)]
25297        #[allow(unused_comparisons)]
25298        if __tmp.remaining() < Self::ENCODED_LEN {
25299            panic!(
25300                "buffer is too small (need {} bytes, but got {})",
25301                Self::ENCODED_LEN,
25302                __tmp.remaining(),
25303            )
25304        }
25305        __tmp.put_u32_le(self.time_boot_ms);
25306        __tmp.put_u16_le(self.chan1_raw);
25307        __tmp.put_u16_le(self.chan2_raw);
25308        __tmp.put_u16_le(self.chan3_raw);
25309        __tmp.put_u16_le(self.chan4_raw);
25310        __tmp.put_u16_le(self.chan5_raw);
25311        __tmp.put_u16_le(self.chan6_raw);
25312        __tmp.put_u16_le(self.chan7_raw);
25313        __tmp.put_u16_le(self.chan8_raw);
25314        __tmp.put_u16_le(self.chan9_raw);
25315        __tmp.put_u16_le(self.chan10_raw);
25316        __tmp.put_u16_le(self.chan11_raw);
25317        __tmp.put_u16_le(self.chan12_raw);
25318        __tmp.put_u16_le(self.chan13_raw);
25319        __tmp.put_u16_le(self.chan14_raw);
25320        __tmp.put_u16_le(self.chan15_raw);
25321        __tmp.put_u16_le(self.chan16_raw);
25322        __tmp.put_u16_le(self.chan17_raw);
25323        __tmp.put_u16_le(self.chan18_raw);
25324        __tmp.put_u8(self.chancount);
25325        __tmp.put_u8(self.rssi);
25326        if matches!(version, MavlinkVersion::V2) {
25327            let len = __tmp.len();
25328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25329        } else {
25330            __tmp.len()
25331        }
25332    }
25333}
25334#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25335#[doc = ""]
25336#[doc = "ID: 70"]
25337#[derive(Debug, Clone, PartialEq)]
25338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25340#[cfg_attr(feature = "ts", derive(TS))]
25341#[cfg_attr(feature = "ts", ts(export))]
25342pub struct RC_CHANNELS_OVERRIDE_DATA {
25343    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25344    pub chan1_raw: u16,
25345    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25346    pub chan2_raw: u16,
25347    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25348    pub chan3_raw: u16,
25349    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25350    pub chan4_raw: u16,
25351    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25352    pub chan5_raw: u16,
25353    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25354    pub chan6_raw: u16,
25355    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25356    pub chan7_raw: u16,
25357    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25358    pub chan8_raw: u16,
25359    #[doc = "System ID"]
25360    pub target_system: u8,
25361    #[doc = "Component ID"]
25362    pub target_component: u8,
25363    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25365    pub chan9_raw: u16,
25366    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25368    pub chan10_raw: u16,
25369    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25371    pub chan11_raw: u16,
25372    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25374    pub chan12_raw: u16,
25375    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25377    pub chan13_raw: u16,
25378    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25380    pub chan14_raw: u16,
25381    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25383    pub chan15_raw: u16,
25384    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25386    pub chan16_raw: u16,
25387    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25389    pub chan17_raw: u16,
25390    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25391    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25392    pub chan18_raw: u16,
25393}
25394impl RC_CHANNELS_OVERRIDE_DATA {
25395    pub const ENCODED_LEN: usize = 38usize;
25396    pub const DEFAULT: Self = Self {
25397        chan1_raw: 0_u16,
25398        chan2_raw: 0_u16,
25399        chan3_raw: 0_u16,
25400        chan4_raw: 0_u16,
25401        chan5_raw: 0_u16,
25402        chan6_raw: 0_u16,
25403        chan7_raw: 0_u16,
25404        chan8_raw: 0_u16,
25405        target_system: 0_u8,
25406        target_component: 0_u8,
25407        chan9_raw: 0_u16,
25408        chan10_raw: 0_u16,
25409        chan11_raw: 0_u16,
25410        chan12_raw: 0_u16,
25411        chan13_raw: 0_u16,
25412        chan14_raw: 0_u16,
25413        chan15_raw: 0_u16,
25414        chan16_raw: 0_u16,
25415        chan17_raw: 0_u16,
25416        chan18_raw: 0_u16,
25417    };
25418    #[cfg(feature = "arbitrary")]
25419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25420        use arbitrary::{Arbitrary, Unstructured};
25421        let mut buf = [0u8; 1024];
25422        rng.fill_bytes(&mut buf);
25423        let mut unstructured = Unstructured::new(&buf);
25424        Self::arbitrary(&mut unstructured).unwrap_or_default()
25425    }
25426}
25427impl Default for RC_CHANNELS_OVERRIDE_DATA {
25428    fn default() -> Self {
25429        Self::DEFAULT.clone()
25430    }
25431}
25432impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25433    type Message = MavMessage;
25434    const ID: u32 = 70u32;
25435    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25436    const EXTRA_CRC: u8 = 124u8;
25437    const ENCODED_LEN: usize = 38usize;
25438    fn deser(
25439        _version: MavlinkVersion,
25440        __input: &[u8],
25441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25442        let avail_len = __input.len();
25443        let mut payload_buf = [0; Self::ENCODED_LEN];
25444        let mut buf = if avail_len < Self::ENCODED_LEN {
25445            payload_buf[0..avail_len].copy_from_slice(__input);
25446            Bytes::new(&payload_buf)
25447        } else {
25448            Bytes::new(__input)
25449        };
25450        let mut __struct = Self::default();
25451        __struct.chan1_raw = buf.get_u16_le();
25452        __struct.chan2_raw = buf.get_u16_le();
25453        __struct.chan3_raw = buf.get_u16_le();
25454        __struct.chan4_raw = buf.get_u16_le();
25455        __struct.chan5_raw = buf.get_u16_le();
25456        __struct.chan6_raw = buf.get_u16_le();
25457        __struct.chan7_raw = buf.get_u16_le();
25458        __struct.chan8_raw = buf.get_u16_le();
25459        __struct.target_system = buf.get_u8();
25460        __struct.target_component = buf.get_u8();
25461        __struct.chan9_raw = buf.get_u16_le();
25462        __struct.chan10_raw = buf.get_u16_le();
25463        __struct.chan11_raw = buf.get_u16_le();
25464        __struct.chan12_raw = buf.get_u16_le();
25465        __struct.chan13_raw = buf.get_u16_le();
25466        __struct.chan14_raw = buf.get_u16_le();
25467        __struct.chan15_raw = buf.get_u16_le();
25468        __struct.chan16_raw = buf.get_u16_le();
25469        __struct.chan17_raw = buf.get_u16_le();
25470        __struct.chan18_raw = buf.get_u16_le();
25471        Ok(__struct)
25472    }
25473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25474        let mut __tmp = BytesMut::new(bytes);
25475        #[allow(clippy::absurd_extreme_comparisons)]
25476        #[allow(unused_comparisons)]
25477        if __tmp.remaining() < Self::ENCODED_LEN {
25478            panic!(
25479                "buffer is too small (need {} bytes, but got {})",
25480                Self::ENCODED_LEN,
25481                __tmp.remaining(),
25482            )
25483        }
25484        __tmp.put_u16_le(self.chan1_raw);
25485        __tmp.put_u16_le(self.chan2_raw);
25486        __tmp.put_u16_le(self.chan3_raw);
25487        __tmp.put_u16_le(self.chan4_raw);
25488        __tmp.put_u16_le(self.chan5_raw);
25489        __tmp.put_u16_le(self.chan6_raw);
25490        __tmp.put_u16_le(self.chan7_raw);
25491        __tmp.put_u16_le(self.chan8_raw);
25492        __tmp.put_u8(self.target_system);
25493        __tmp.put_u8(self.target_component);
25494        if matches!(version, MavlinkVersion::V2) {
25495            __tmp.put_u16_le(self.chan9_raw);
25496            __tmp.put_u16_le(self.chan10_raw);
25497            __tmp.put_u16_le(self.chan11_raw);
25498            __tmp.put_u16_le(self.chan12_raw);
25499            __tmp.put_u16_le(self.chan13_raw);
25500            __tmp.put_u16_le(self.chan14_raw);
25501            __tmp.put_u16_le(self.chan15_raw);
25502            __tmp.put_u16_le(self.chan16_raw);
25503            __tmp.put_u16_le(self.chan17_raw);
25504            __tmp.put_u16_le(self.chan18_raw);
25505            let len = __tmp.len();
25506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25507        } else {
25508            __tmp.len()
25509        }
25510    }
25511}
25512#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25513#[doc = ""]
25514#[doc = "ID: 35"]
25515#[derive(Debug, Clone, PartialEq)]
25516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25518#[cfg_attr(feature = "ts", derive(TS))]
25519#[cfg_attr(feature = "ts", ts(export))]
25520pub struct RC_CHANNELS_RAW_DATA {
25521    #[doc = "Timestamp (time since system boot)."]
25522    pub time_boot_ms: u32,
25523    #[doc = "RC channel 1 value."]
25524    pub chan1_raw: u16,
25525    #[doc = "RC channel 2 value."]
25526    pub chan2_raw: u16,
25527    #[doc = "RC channel 3 value."]
25528    pub chan3_raw: u16,
25529    #[doc = "RC channel 4 value."]
25530    pub chan4_raw: u16,
25531    #[doc = "RC channel 5 value."]
25532    pub chan5_raw: u16,
25533    #[doc = "RC channel 6 value."]
25534    pub chan6_raw: u16,
25535    #[doc = "RC channel 7 value."]
25536    pub chan7_raw: u16,
25537    #[doc = "RC channel 8 value."]
25538    pub chan8_raw: u16,
25539    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25540    pub port: u8,
25541    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25542    pub rssi: u8,
25543}
25544impl RC_CHANNELS_RAW_DATA {
25545    pub const ENCODED_LEN: usize = 22usize;
25546    pub const DEFAULT: Self = Self {
25547        time_boot_ms: 0_u32,
25548        chan1_raw: 0_u16,
25549        chan2_raw: 0_u16,
25550        chan3_raw: 0_u16,
25551        chan4_raw: 0_u16,
25552        chan5_raw: 0_u16,
25553        chan6_raw: 0_u16,
25554        chan7_raw: 0_u16,
25555        chan8_raw: 0_u16,
25556        port: 0_u8,
25557        rssi: 0_u8,
25558    };
25559    #[cfg(feature = "arbitrary")]
25560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25561        use arbitrary::{Arbitrary, Unstructured};
25562        let mut buf = [0u8; 1024];
25563        rng.fill_bytes(&mut buf);
25564        let mut unstructured = Unstructured::new(&buf);
25565        Self::arbitrary(&mut unstructured).unwrap_or_default()
25566    }
25567}
25568impl Default for RC_CHANNELS_RAW_DATA {
25569    fn default() -> Self {
25570        Self::DEFAULT.clone()
25571    }
25572}
25573impl MessageData for RC_CHANNELS_RAW_DATA {
25574    type Message = MavMessage;
25575    const ID: u32 = 35u32;
25576    const NAME: &'static str = "RC_CHANNELS_RAW";
25577    const EXTRA_CRC: u8 = 244u8;
25578    const ENCODED_LEN: usize = 22usize;
25579    fn deser(
25580        _version: MavlinkVersion,
25581        __input: &[u8],
25582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25583        let avail_len = __input.len();
25584        let mut payload_buf = [0; Self::ENCODED_LEN];
25585        let mut buf = if avail_len < Self::ENCODED_LEN {
25586            payload_buf[0..avail_len].copy_from_slice(__input);
25587            Bytes::new(&payload_buf)
25588        } else {
25589            Bytes::new(__input)
25590        };
25591        let mut __struct = Self::default();
25592        __struct.time_boot_ms = buf.get_u32_le();
25593        __struct.chan1_raw = buf.get_u16_le();
25594        __struct.chan2_raw = buf.get_u16_le();
25595        __struct.chan3_raw = buf.get_u16_le();
25596        __struct.chan4_raw = buf.get_u16_le();
25597        __struct.chan5_raw = buf.get_u16_le();
25598        __struct.chan6_raw = buf.get_u16_le();
25599        __struct.chan7_raw = buf.get_u16_le();
25600        __struct.chan8_raw = buf.get_u16_le();
25601        __struct.port = buf.get_u8();
25602        __struct.rssi = buf.get_u8();
25603        Ok(__struct)
25604    }
25605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25606        let mut __tmp = BytesMut::new(bytes);
25607        #[allow(clippy::absurd_extreme_comparisons)]
25608        #[allow(unused_comparisons)]
25609        if __tmp.remaining() < Self::ENCODED_LEN {
25610            panic!(
25611                "buffer is too small (need {} bytes, but got {})",
25612                Self::ENCODED_LEN,
25613                __tmp.remaining(),
25614            )
25615        }
25616        __tmp.put_u32_le(self.time_boot_ms);
25617        __tmp.put_u16_le(self.chan1_raw);
25618        __tmp.put_u16_le(self.chan2_raw);
25619        __tmp.put_u16_le(self.chan3_raw);
25620        __tmp.put_u16_le(self.chan4_raw);
25621        __tmp.put_u16_le(self.chan5_raw);
25622        __tmp.put_u16_le(self.chan6_raw);
25623        __tmp.put_u16_le(self.chan7_raw);
25624        __tmp.put_u16_le(self.chan8_raw);
25625        __tmp.put_u8(self.port);
25626        __tmp.put_u8(self.rssi);
25627        if matches!(version, MavlinkVersion::V2) {
25628            let len = __tmp.len();
25629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25630        } else {
25631            __tmp.len()
25632        }
25633    }
25634}
25635#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25636#[doc = ""]
25637#[doc = "ID: 34"]
25638#[derive(Debug, Clone, PartialEq)]
25639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25641#[cfg_attr(feature = "ts", derive(TS))]
25642#[cfg_attr(feature = "ts", ts(export))]
25643pub struct RC_CHANNELS_SCALED_DATA {
25644    #[doc = "Timestamp (time since system boot)."]
25645    pub time_boot_ms: u32,
25646    #[doc = "RC channel 1 value scaled."]
25647    pub chan1_scaled: i16,
25648    #[doc = "RC channel 2 value scaled."]
25649    pub chan2_scaled: i16,
25650    #[doc = "RC channel 3 value scaled."]
25651    pub chan3_scaled: i16,
25652    #[doc = "RC channel 4 value scaled."]
25653    pub chan4_scaled: i16,
25654    #[doc = "RC channel 5 value scaled."]
25655    pub chan5_scaled: i16,
25656    #[doc = "RC channel 6 value scaled."]
25657    pub chan6_scaled: i16,
25658    #[doc = "RC channel 7 value scaled."]
25659    pub chan7_scaled: i16,
25660    #[doc = "RC channel 8 value scaled."]
25661    pub chan8_scaled: i16,
25662    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25663    pub port: u8,
25664    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25665    pub rssi: u8,
25666}
25667impl RC_CHANNELS_SCALED_DATA {
25668    pub const ENCODED_LEN: usize = 22usize;
25669    pub const DEFAULT: Self = Self {
25670        time_boot_ms: 0_u32,
25671        chan1_scaled: 0_i16,
25672        chan2_scaled: 0_i16,
25673        chan3_scaled: 0_i16,
25674        chan4_scaled: 0_i16,
25675        chan5_scaled: 0_i16,
25676        chan6_scaled: 0_i16,
25677        chan7_scaled: 0_i16,
25678        chan8_scaled: 0_i16,
25679        port: 0_u8,
25680        rssi: 0_u8,
25681    };
25682    #[cfg(feature = "arbitrary")]
25683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25684        use arbitrary::{Arbitrary, Unstructured};
25685        let mut buf = [0u8; 1024];
25686        rng.fill_bytes(&mut buf);
25687        let mut unstructured = Unstructured::new(&buf);
25688        Self::arbitrary(&mut unstructured).unwrap_or_default()
25689    }
25690}
25691impl Default for RC_CHANNELS_SCALED_DATA {
25692    fn default() -> Self {
25693        Self::DEFAULT.clone()
25694    }
25695}
25696impl MessageData for RC_CHANNELS_SCALED_DATA {
25697    type Message = MavMessage;
25698    const ID: u32 = 34u32;
25699    const NAME: &'static str = "RC_CHANNELS_SCALED";
25700    const EXTRA_CRC: u8 = 237u8;
25701    const ENCODED_LEN: usize = 22usize;
25702    fn deser(
25703        _version: MavlinkVersion,
25704        __input: &[u8],
25705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25706        let avail_len = __input.len();
25707        let mut payload_buf = [0; Self::ENCODED_LEN];
25708        let mut buf = if avail_len < Self::ENCODED_LEN {
25709            payload_buf[0..avail_len].copy_from_slice(__input);
25710            Bytes::new(&payload_buf)
25711        } else {
25712            Bytes::new(__input)
25713        };
25714        let mut __struct = Self::default();
25715        __struct.time_boot_ms = buf.get_u32_le();
25716        __struct.chan1_scaled = buf.get_i16_le();
25717        __struct.chan2_scaled = buf.get_i16_le();
25718        __struct.chan3_scaled = buf.get_i16_le();
25719        __struct.chan4_scaled = buf.get_i16_le();
25720        __struct.chan5_scaled = buf.get_i16_le();
25721        __struct.chan6_scaled = buf.get_i16_le();
25722        __struct.chan7_scaled = buf.get_i16_le();
25723        __struct.chan8_scaled = buf.get_i16_le();
25724        __struct.port = buf.get_u8();
25725        __struct.rssi = buf.get_u8();
25726        Ok(__struct)
25727    }
25728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25729        let mut __tmp = BytesMut::new(bytes);
25730        #[allow(clippy::absurd_extreme_comparisons)]
25731        #[allow(unused_comparisons)]
25732        if __tmp.remaining() < Self::ENCODED_LEN {
25733            panic!(
25734                "buffer is too small (need {} bytes, but got {})",
25735                Self::ENCODED_LEN,
25736                __tmp.remaining(),
25737            )
25738        }
25739        __tmp.put_u32_le(self.time_boot_ms);
25740        __tmp.put_i16_le(self.chan1_scaled);
25741        __tmp.put_i16_le(self.chan2_scaled);
25742        __tmp.put_i16_le(self.chan3_scaled);
25743        __tmp.put_i16_le(self.chan4_scaled);
25744        __tmp.put_i16_le(self.chan5_scaled);
25745        __tmp.put_i16_le(self.chan6_scaled);
25746        __tmp.put_i16_le(self.chan7_scaled);
25747        __tmp.put_i16_le(self.chan8_scaled);
25748        __tmp.put_u8(self.port);
25749        __tmp.put_u8(self.rssi);
25750        if matches!(version, MavlinkVersion::V2) {
25751            let len = __tmp.len();
25752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25753        } else {
25754            __tmp.len()
25755        }
25756    }
25757}
25758#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25759#[doc = "Request a data stream."]
25760#[doc = ""]
25761#[doc = "ID: 66"]
25762#[derive(Debug, Clone, PartialEq)]
25763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25765#[cfg_attr(feature = "ts", derive(TS))]
25766#[cfg_attr(feature = "ts", ts(export))]
25767pub struct REQUEST_DATA_STREAM_DATA {
25768    #[doc = "The requested message rate"]
25769    pub req_message_rate: u16,
25770    #[doc = "The target requested to send the message stream."]
25771    pub target_system: u8,
25772    #[doc = "The target requested to send the message stream."]
25773    pub target_component: u8,
25774    #[doc = "The ID of the requested data stream"]
25775    pub req_stream_id: u8,
25776    #[doc = "1 to start sending, 0 to stop sending."]
25777    pub start_stop: u8,
25778}
25779impl REQUEST_DATA_STREAM_DATA {
25780    pub const ENCODED_LEN: usize = 6usize;
25781    pub const DEFAULT: Self = Self {
25782        req_message_rate: 0_u16,
25783        target_system: 0_u8,
25784        target_component: 0_u8,
25785        req_stream_id: 0_u8,
25786        start_stop: 0_u8,
25787    };
25788    #[cfg(feature = "arbitrary")]
25789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25790        use arbitrary::{Arbitrary, Unstructured};
25791        let mut buf = [0u8; 1024];
25792        rng.fill_bytes(&mut buf);
25793        let mut unstructured = Unstructured::new(&buf);
25794        Self::arbitrary(&mut unstructured).unwrap_or_default()
25795    }
25796}
25797impl Default for REQUEST_DATA_STREAM_DATA {
25798    fn default() -> Self {
25799        Self::DEFAULT.clone()
25800    }
25801}
25802impl MessageData for REQUEST_DATA_STREAM_DATA {
25803    type Message = MavMessage;
25804    const ID: u32 = 66u32;
25805    const NAME: &'static str = "REQUEST_DATA_STREAM";
25806    const EXTRA_CRC: u8 = 148u8;
25807    const ENCODED_LEN: usize = 6usize;
25808    fn deser(
25809        _version: MavlinkVersion,
25810        __input: &[u8],
25811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25812        let avail_len = __input.len();
25813        let mut payload_buf = [0; Self::ENCODED_LEN];
25814        let mut buf = if avail_len < Self::ENCODED_LEN {
25815            payload_buf[0..avail_len].copy_from_slice(__input);
25816            Bytes::new(&payload_buf)
25817        } else {
25818            Bytes::new(__input)
25819        };
25820        let mut __struct = Self::default();
25821        __struct.req_message_rate = buf.get_u16_le();
25822        __struct.target_system = buf.get_u8();
25823        __struct.target_component = buf.get_u8();
25824        __struct.req_stream_id = buf.get_u8();
25825        __struct.start_stop = buf.get_u8();
25826        Ok(__struct)
25827    }
25828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25829        let mut __tmp = BytesMut::new(bytes);
25830        #[allow(clippy::absurd_extreme_comparisons)]
25831        #[allow(unused_comparisons)]
25832        if __tmp.remaining() < Self::ENCODED_LEN {
25833            panic!(
25834                "buffer is too small (need {} bytes, but got {})",
25835                Self::ENCODED_LEN,
25836                __tmp.remaining(),
25837            )
25838        }
25839        __tmp.put_u16_le(self.req_message_rate);
25840        __tmp.put_u8(self.target_system);
25841        __tmp.put_u8(self.target_component);
25842        __tmp.put_u8(self.req_stream_id);
25843        __tmp.put_u8(self.start_stop);
25844        if matches!(version, MavlinkVersion::V2) {
25845            let len = __tmp.len();
25846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25847        } else {
25848            __tmp.len()
25849        }
25850    }
25851}
25852#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25853#[doc = ""]
25854#[doc = "ID: 412"]
25855#[derive(Debug, Clone, PartialEq)]
25856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25858#[cfg_attr(feature = "ts", derive(TS))]
25859#[cfg_attr(feature = "ts", ts(export))]
25860pub struct REQUEST_EVENT_DATA {
25861    #[doc = "First sequence number of the requested event."]
25862    pub first_sequence: u16,
25863    #[doc = "Last sequence number of the requested event."]
25864    pub last_sequence: u16,
25865    #[doc = "System ID"]
25866    pub target_system: u8,
25867    #[doc = "Component ID"]
25868    pub target_component: u8,
25869}
25870impl REQUEST_EVENT_DATA {
25871    pub const ENCODED_LEN: usize = 6usize;
25872    pub const DEFAULT: Self = Self {
25873        first_sequence: 0_u16,
25874        last_sequence: 0_u16,
25875        target_system: 0_u8,
25876        target_component: 0_u8,
25877    };
25878    #[cfg(feature = "arbitrary")]
25879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25880        use arbitrary::{Arbitrary, Unstructured};
25881        let mut buf = [0u8; 1024];
25882        rng.fill_bytes(&mut buf);
25883        let mut unstructured = Unstructured::new(&buf);
25884        Self::arbitrary(&mut unstructured).unwrap_or_default()
25885    }
25886}
25887impl Default for REQUEST_EVENT_DATA {
25888    fn default() -> Self {
25889        Self::DEFAULT.clone()
25890    }
25891}
25892impl MessageData for REQUEST_EVENT_DATA {
25893    type Message = MavMessage;
25894    const ID: u32 = 412u32;
25895    const NAME: &'static str = "REQUEST_EVENT";
25896    const EXTRA_CRC: u8 = 33u8;
25897    const ENCODED_LEN: usize = 6usize;
25898    fn deser(
25899        _version: MavlinkVersion,
25900        __input: &[u8],
25901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25902        let avail_len = __input.len();
25903        let mut payload_buf = [0; Self::ENCODED_LEN];
25904        let mut buf = if avail_len < Self::ENCODED_LEN {
25905            payload_buf[0..avail_len].copy_from_slice(__input);
25906            Bytes::new(&payload_buf)
25907        } else {
25908            Bytes::new(__input)
25909        };
25910        let mut __struct = Self::default();
25911        __struct.first_sequence = buf.get_u16_le();
25912        __struct.last_sequence = buf.get_u16_le();
25913        __struct.target_system = buf.get_u8();
25914        __struct.target_component = buf.get_u8();
25915        Ok(__struct)
25916    }
25917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25918        let mut __tmp = BytesMut::new(bytes);
25919        #[allow(clippy::absurd_extreme_comparisons)]
25920        #[allow(unused_comparisons)]
25921        if __tmp.remaining() < Self::ENCODED_LEN {
25922            panic!(
25923                "buffer is too small (need {} bytes, but got {})",
25924                Self::ENCODED_LEN,
25925                __tmp.remaining(),
25926            )
25927        }
25928        __tmp.put_u16_le(self.first_sequence);
25929        __tmp.put_u16_le(self.last_sequence);
25930        __tmp.put_u8(self.target_system);
25931        __tmp.put_u8(self.target_component);
25932        if matches!(version, MavlinkVersion::V2) {
25933            let len = __tmp.len();
25934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25935        } else {
25936            __tmp.len()
25937        }
25938    }
25939}
25940#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25941#[doc = ""]
25942#[doc = "ID: 142"]
25943#[derive(Debug, Clone, PartialEq)]
25944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25946#[cfg_attr(feature = "ts", derive(TS))]
25947#[cfg_attr(feature = "ts", ts(export))]
25948pub struct RESOURCE_REQUEST_DATA {
25949    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25950    pub request_id: u8,
25951    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25952    pub uri_type: u8,
25953    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25956    pub uri: [u8; 120],
25957    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25958    pub transfer_type: u8,
25959    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25962    pub storage: [u8; 120],
25963}
25964impl RESOURCE_REQUEST_DATA {
25965    pub const ENCODED_LEN: usize = 243usize;
25966    pub const DEFAULT: Self = Self {
25967        request_id: 0_u8,
25968        uri_type: 0_u8,
25969        uri: [0_u8; 120usize],
25970        transfer_type: 0_u8,
25971        storage: [0_u8; 120usize],
25972    };
25973    #[cfg(feature = "arbitrary")]
25974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25975        use arbitrary::{Arbitrary, Unstructured};
25976        let mut buf = [0u8; 1024];
25977        rng.fill_bytes(&mut buf);
25978        let mut unstructured = Unstructured::new(&buf);
25979        Self::arbitrary(&mut unstructured).unwrap_or_default()
25980    }
25981}
25982impl Default for RESOURCE_REQUEST_DATA {
25983    fn default() -> Self {
25984        Self::DEFAULT.clone()
25985    }
25986}
25987impl MessageData for RESOURCE_REQUEST_DATA {
25988    type Message = MavMessage;
25989    const ID: u32 = 142u32;
25990    const NAME: &'static str = "RESOURCE_REQUEST";
25991    const EXTRA_CRC: u8 = 72u8;
25992    const ENCODED_LEN: usize = 243usize;
25993    fn deser(
25994        _version: MavlinkVersion,
25995        __input: &[u8],
25996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25997        let avail_len = __input.len();
25998        let mut payload_buf = [0; Self::ENCODED_LEN];
25999        let mut buf = if avail_len < Self::ENCODED_LEN {
26000            payload_buf[0..avail_len].copy_from_slice(__input);
26001            Bytes::new(&payload_buf)
26002        } else {
26003            Bytes::new(__input)
26004        };
26005        let mut __struct = Self::default();
26006        __struct.request_id = buf.get_u8();
26007        __struct.uri_type = buf.get_u8();
26008        for v in &mut __struct.uri {
26009            let val = buf.get_u8();
26010            *v = val;
26011        }
26012        __struct.transfer_type = buf.get_u8();
26013        for v in &mut __struct.storage {
26014            let val = buf.get_u8();
26015            *v = val;
26016        }
26017        Ok(__struct)
26018    }
26019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26020        let mut __tmp = BytesMut::new(bytes);
26021        #[allow(clippy::absurd_extreme_comparisons)]
26022        #[allow(unused_comparisons)]
26023        if __tmp.remaining() < Self::ENCODED_LEN {
26024            panic!(
26025                "buffer is too small (need {} bytes, but got {})",
26026                Self::ENCODED_LEN,
26027                __tmp.remaining(),
26028            )
26029        }
26030        __tmp.put_u8(self.request_id);
26031        __tmp.put_u8(self.uri_type);
26032        for val in &self.uri {
26033            __tmp.put_u8(*val);
26034        }
26035        __tmp.put_u8(self.transfer_type);
26036        for val in &self.storage {
26037            __tmp.put_u8(*val);
26038        }
26039        if matches!(version, MavlinkVersion::V2) {
26040            let len = __tmp.len();
26041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26042        } else {
26043            __tmp.len()
26044        }
26045    }
26046}
26047#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26048#[doc = ""]
26049#[doc = "ID: 413"]
26050#[derive(Debug, Clone, PartialEq)]
26051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26053#[cfg_attr(feature = "ts", derive(TS))]
26054#[cfg_attr(feature = "ts", ts(export))]
26055pub struct RESPONSE_EVENT_ERROR_DATA {
26056    #[doc = "Sequence number."]
26057    pub sequence: u16,
26058    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26059    pub sequence_oldest_available: u16,
26060    #[doc = "System ID"]
26061    pub target_system: u8,
26062    #[doc = "Component ID"]
26063    pub target_component: u8,
26064    #[doc = "Error reason."]
26065    pub reason: MavEventErrorReason,
26066}
26067impl RESPONSE_EVENT_ERROR_DATA {
26068    pub const ENCODED_LEN: usize = 7usize;
26069    pub const DEFAULT: Self = Self {
26070        sequence: 0_u16,
26071        sequence_oldest_available: 0_u16,
26072        target_system: 0_u8,
26073        target_component: 0_u8,
26074        reason: MavEventErrorReason::DEFAULT,
26075    };
26076    #[cfg(feature = "arbitrary")]
26077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26078        use arbitrary::{Arbitrary, Unstructured};
26079        let mut buf = [0u8; 1024];
26080        rng.fill_bytes(&mut buf);
26081        let mut unstructured = Unstructured::new(&buf);
26082        Self::arbitrary(&mut unstructured).unwrap_or_default()
26083    }
26084}
26085impl Default for RESPONSE_EVENT_ERROR_DATA {
26086    fn default() -> Self {
26087        Self::DEFAULT.clone()
26088    }
26089}
26090impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26091    type Message = MavMessage;
26092    const ID: u32 = 413u32;
26093    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26094    const EXTRA_CRC: u8 = 77u8;
26095    const ENCODED_LEN: usize = 7usize;
26096    fn deser(
26097        _version: MavlinkVersion,
26098        __input: &[u8],
26099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26100        let avail_len = __input.len();
26101        let mut payload_buf = [0; Self::ENCODED_LEN];
26102        let mut buf = if avail_len < Self::ENCODED_LEN {
26103            payload_buf[0..avail_len].copy_from_slice(__input);
26104            Bytes::new(&payload_buf)
26105        } else {
26106            Bytes::new(__input)
26107        };
26108        let mut __struct = Self::default();
26109        __struct.sequence = buf.get_u16_le();
26110        __struct.sequence_oldest_available = buf.get_u16_le();
26111        __struct.target_system = buf.get_u8();
26112        __struct.target_component = buf.get_u8();
26113        let tmp = buf.get_u8();
26114        __struct.reason =
26115            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26116                enum_type: "MavEventErrorReason",
26117                value: tmp as u64,
26118            })?;
26119        Ok(__struct)
26120    }
26121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26122        let mut __tmp = BytesMut::new(bytes);
26123        #[allow(clippy::absurd_extreme_comparisons)]
26124        #[allow(unused_comparisons)]
26125        if __tmp.remaining() < Self::ENCODED_LEN {
26126            panic!(
26127                "buffer is too small (need {} bytes, but got {})",
26128                Self::ENCODED_LEN,
26129                __tmp.remaining(),
26130            )
26131        }
26132        __tmp.put_u16_le(self.sequence);
26133        __tmp.put_u16_le(self.sequence_oldest_available);
26134        __tmp.put_u8(self.target_system);
26135        __tmp.put_u8(self.target_component);
26136        __tmp.put_u8(self.reason as u8);
26137        if matches!(version, MavlinkVersion::V2) {
26138            let len = __tmp.len();
26139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26140        } else {
26141            __tmp.len()
26142        }
26143    }
26144}
26145#[doc = "Read out the safety zone the MAV currently assumes."]
26146#[doc = ""]
26147#[doc = "ID: 55"]
26148#[derive(Debug, Clone, PartialEq)]
26149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26151#[cfg_attr(feature = "ts", derive(TS))]
26152#[cfg_attr(feature = "ts", ts(export))]
26153pub struct SAFETY_ALLOWED_AREA_DATA {
26154    #[doc = "x position 1 / Latitude 1"]
26155    pub p1x: f32,
26156    #[doc = "y position 1 / Longitude 1"]
26157    pub p1y: f32,
26158    #[doc = "z position 1 / Altitude 1"]
26159    pub p1z: f32,
26160    #[doc = "x position 2 / Latitude 2"]
26161    pub p2x: f32,
26162    #[doc = "y position 2 / Longitude 2"]
26163    pub p2y: f32,
26164    #[doc = "z position 2 / Altitude 2"]
26165    pub p2z: f32,
26166    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26167    pub frame: MavFrame,
26168}
26169impl SAFETY_ALLOWED_AREA_DATA {
26170    pub const ENCODED_LEN: usize = 25usize;
26171    pub const DEFAULT: Self = Self {
26172        p1x: 0.0_f32,
26173        p1y: 0.0_f32,
26174        p1z: 0.0_f32,
26175        p2x: 0.0_f32,
26176        p2y: 0.0_f32,
26177        p2z: 0.0_f32,
26178        frame: MavFrame::DEFAULT,
26179    };
26180    #[cfg(feature = "arbitrary")]
26181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26182        use arbitrary::{Arbitrary, Unstructured};
26183        let mut buf = [0u8; 1024];
26184        rng.fill_bytes(&mut buf);
26185        let mut unstructured = Unstructured::new(&buf);
26186        Self::arbitrary(&mut unstructured).unwrap_or_default()
26187    }
26188}
26189impl Default for SAFETY_ALLOWED_AREA_DATA {
26190    fn default() -> Self {
26191        Self::DEFAULT.clone()
26192    }
26193}
26194impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26195    type Message = MavMessage;
26196    const ID: u32 = 55u32;
26197    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26198    const EXTRA_CRC: u8 = 3u8;
26199    const ENCODED_LEN: usize = 25usize;
26200    fn deser(
26201        _version: MavlinkVersion,
26202        __input: &[u8],
26203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26204        let avail_len = __input.len();
26205        let mut payload_buf = [0; Self::ENCODED_LEN];
26206        let mut buf = if avail_len < Self::ENCODED_LEN {
26207            payload_buf[0..avail_len].copy_from_slice(__input);
26208            Bytes::new(&payload_buf)
26209        } else {
26210            Bytes::new(__input)
26211        };
26212        let mut __struct = Self::default();
26213        __struct.p1x = buf.get_f32_le();
26214        __struct.p1y = buf.get_f32_le();
26215        __struct.p1z = buf.get_f32_le();
26216        __struct.p2x = buf.get_f32_le();
26217        __struct.p2y = buf.get_f32_le();
26218        __struct.p2z = buf.get_f32_le();
26219        let tmp = buf.get_u8();
26220        __struct.frame =
26221            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26222                enum_type: "MavFrame",
26223                value: tmp as u64,
26224            })?;
26225        Ok(__struct)
26226    }
26227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26228        let mut __tmp = BytesMut::new(bytes);
26229        #[allow(clippy::absurd_extreme_comparisons)]
26230        #[allow(unused_comparisons)]
26231        if __tmp.remaining() < Self::ENCODED_LEN {
26232            panic!(
26233                "buffer is too small (need {} bytes, but got {})",
26234                Self::ENCODED_LEN,
26235                __tmp.remaining(),
26236            )
26237        }
26238        __tmp.put_f32_le(self.p1x);
26239        __tmp.put_f32_le(self.p1y);
26240        __tmp.put_f32_le(self.p1z);
26241        __tmp.put_f32_le(self.p2x);
26242        __tmp.put_f32_le(self.p2y);
26243        __tmp.put_f32_le(self.p2z);
26244        __tmp.put_u8(self.frame as u8);
26245        if matches!(version, MavlinkVersion::V2) {
26246            let len = __tmp.len();
26247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26248        } else {
26249            __tmp.len()
26250        }
26251    }
26252}
26253#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26254#[doc = ""]
26255#[doc = "ID: 54"]
26256#[derive(Debug, Clone, PartialEq)]
26257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26259#[cfg_attr(feature = "ts", derive(TS))]
26260#[cfg_attr(feature = "ts", ts(export))]
26261pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26262    #[doc = "x position 1 / Latitude 1"]
26263    pub p1x: f32,
26264    #[doc = "y position 1 / Longitude 1"]
26265    pub p1y: f32,
26266    #[doc = "z position 1 / Altitude 1"]
26267    pub p1z: f32,
26268    #[doc = "x position 2 / Latitude 2"]
26269    pub p2x: f32,
26270    #[doc = "y position 2 / Longitude 2"]
26271    pub p2y: f32,
26272    #[doc = "z position 2 / Altitude 2"]
26273    pub p2z: f32,
26274    #[doc = "System ID"]
26275    pub target_system: u8,
26276    #[doc = "Component ID"]
26277    pub target_component: u8,
26278    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26279    pub frame: MavFrame,
26280}
26281impl SAFETY_SET_ALLOWED_AREA_DATA {
26282    pub const ENCODED_LEN: usize = 27usize;
26283    pub const DEFAULT: Self = Self {
26284        p1x: 0.0_f32,
26285        p1y: 0.0_f32,
26286        p1z: 0.0_f32,
26287        p2x: 0.0_f32,
26288        p2y: 0.0_f32,
26289        p2z: 0.0_f32,
26290        target_system: 0_u8,
26291        target_component: 0_u8,
26292        frame: MavFrame::DEFAULT,
26293    };
26294    #[cfg(feature = "arbitrary")]
26295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26296        use arbitrary::{Arbitrary, Unstructured};
26297        let mut buf = [0u8; 1024];
26298        rng.fill_bytes(&mut buf);
26299        let mut unstructured = Unstructured::new(&buf);
26300        Self::arbitrary(&mut unstructured).unwrap_or_default()
26301    }
26302}
26303impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26304    fn default() -> Self {
26305        Self::DEFAULT.clone()
26306    }
26307}
26308impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26309    type Message = MavMessage;
26310    const ID: u32 = 54u32;
26311    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26312    const EXTRA_CRC: u8 = 15u8;
26313    const ENCODED_LEN: usize = 27usize;
26314    fn deser(
26315        _version: MavlinkVersion,
26316        __input: &[u8],
26317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26318        let avail_len = __input.len();
26319        let mut payload_buf = [0; Self::ENCODED_LEN];
26320        let mut buf = if avail_len < Self::ENCODED_LEN {
26321            payload_buf[0..avail_len].copy_from_slice(__input);
26322            Bytes::new(&payload_buf)
26323        } else {
26324            Bytes::new(__input)
26325        };
26326        let mut __struct = Self::default();
26327        __struct.p1x = buf.get_f32_le();
26328        __struct.p1y = buf.get_f32_le();
26329        __struct.p1z = buf.get_f32_le();
26330        __struct.p2x = buf.get_f32_le();
26331        __struct.p2y = buf.get_f32_le();
26332        __struct.p2z = buf.get_f32_le();
26333        __struct.target_system = buf.get_u8();
26334        __struct.target_component = buf.get_u8();
26335        let tmp = buf.get_u8();
26336        __struct.frame =
26337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26338                enum_type: "MavFrame",
26339                value: tmp as u64,
26340            })?;
26341        Ok(__struct)
26342    }
26343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26344        let mut __tmp = BytesMut::new(bytes);
26345        #[allow(clippy::absurd_extreme_comparisons)]
26346        #[allow(unused_comparisons)]
26347        if __tmp.remaining() < Self::ENCODED_LEN {
26348            panic!(
26349                "buffer is too small (need {} bytes, but got {})",
26350                Self::ENCODED_LEN,
26351                __tmp.remaining(),
26352            )
26353        }
26354        __tmp.put_f32_le(self.p1x);
26355        __tmp.put_f32_le(self.p1y);
26356        __tmp.put_f32_le(self.p1z);
26357        __tmp.put_f32_le(self.p2x);
26358        __tmp.put_f32_le(self.p2y);
26359        __tmp.put_f32_le(self.p2z);
26360        __tmp.put_u8(self.target_system);
26361        __tmp.put_u8(self.target_component);
26362        __tmp.put_u8(self.frame as u8);
26363        if matches!(version, MavlinkVersion::V2) {
26364            let len = __tmp.len();
26365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26366        } else {
26367            __tmp.len()
26368        }
26369    }
26370}
26371#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26372#[doc = ""]
26373#[doc = "ID: 26"]
26374#[derive(Debug, Clone, PartialEq)]
26375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26377#[cfg_attr(feature = "ts", derive(TS))]
26378#[cfg_attr(feature = "ts", ts(export))]
26379pub struct SCALED_IMU_DATA {
26380    #[doc = "Timestamp (time since system boot)."]
26381    pub time_boot_ms: u32,
26382    #[doc = "X acceleration"]
26383    pub xacc: i16,
26384    #[doc = "Y acceleration"]
26385    pub yacc: i16,
26386    #[doc = "Z acceleration"]
26387    pub zacc: i16,
26388    #[doc = "Angular speed around X axis"]
26389    pub xgyro: i16,
26390    #[doc = "Angular speed around Y axis"]
26391    pub ygyro: i16,
26392    #[doc = "Angular speed around Z axis"]
26393    pub zgyro: i16,
26394    #[doc = "X Magnetic field"]
26395    pub xmag: i16,
26396    #[doc = "Y Magnetic field"]
26397    pub ymag: i16,
26398    #[doc = "Z Magnetic field"]
26399    pub zmag: i16,
26400    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26402    pub temperature: i16,
26403}
26404impl SCALED_IMU_DATA {
26405    pub const ENCODED_LEN: usize = 24usize;
26406    pub const DEFAULT: Self = Self {
26407        time_boot_ms: 0_u32,
26408        xacc: 0_i16,
26409        yacc: 0_i16,
26410        zacc: 0_i16,
26411        xgyro: 0_i16,
26412        ygyro: 0_i16,
26413        zgyro: 0_i16,
26414        xmag: 0_i16,
26415        ymag: 0_i16,
26416        zmag: 0_i16,
26417        temperature: 0_i16,
26418    };
26419    #[cfg(feature = "arbitrary")]
26420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26421        use arbitrary::{Arbitrary, Unstructured};
26422        let mut buf = [0u8; 1024];
26423        rng.fill_bytes(&mut buf);
26424        let mut unstructured = Unstructured::new(&buf);
26425        Self::arbitrary(&mut unstructured).unwrap_or_default()
26426    }
26427}
26428impl Default for SCALED_IMU_DATA {
26429    fn default() -> Self {
26430        Self::DEFAULT.clone()
26431    }
26432}
26433impl MessageData for SCALED_IMU_DATA {
26434    type Message = MavMessage;
26435    const ID: u32 = 26u32;
26436    const NAME: &'static str = "SCALED_IMU";
26437    const EXTRA_CRC: u8 = 170u8;
26438    const ENCODED_LEN: usize = 24usize;
26439    fn deser(
26440        _version: MavlinkVersion,
26441        __input: &[u8],
26442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26443        let avail_len = __input.len();
26444        let mut payload_buf = [0; Self::ENCODED_LEN];
26445        let mut buf = if avail_len < Self::ENCODED_LEN {
26446            payload_buf[0..avail_len].copy_from_slice(__input);
26447            Bytes::new(&payload_buf)
26448        } else {
26449            Bytes::new(__input)
26450        };
26451        let mut __struct = Self::default();
26452        __struct.time_boot_ms = buf.get_u32_le();
26453        __struct.xacc = buf.get_i16_le();
26454        __struct.yacc = buf.get_i16_le();
26455        __struct.zacc = buf.get_i16_le();
26456        __struct.xgyro = buf.get_i16_le();
26457        __struct.ygyro = buf.get_i16_le();
26458        __struct.zgyro = buf.get_i16_le();
26459        __struct.xmag = buf.get_i16_le();
26460        __struct.ymag = buf.get_i16_le();
26461        __struct.zmag = buf.get_i16_le();
26462        __struct.temperature = buf.get_i16_le();
26463        Ok(__struct)
26464    }
26465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26466        let mut __tmp = BytesMut::new(bytes);
26467        #[allow(clippy::absurd_extreme_comparisons)]
26468        #[allow(unused_comparisons)]
26469        if __tmp.remaining() < Self::ENCODED_LEN {
26470            panic!(
26471                "buffer is too small (need {} bytes, but got {})",
26472                Self::ENCODED_LEN,
26473                __tmp.remaining(),
26474            )
26475        }
26476        __tmp.put_u32_le(self.time_boot_ms);
26477        __tmp.put_i16_le(self.xacc);
26478        __tmp.put_i16_le(self.yacc);
26479        __tmp.put_i16_le(self.zacc);
26480        __tmp.put_i16_le(self.xgyro);
26481        __tmp.put_i16_le(self.ygyro);
26482        __tmp.put_i16_le(self.zgyro);
26483        __tmp.put_i16_le(self.xmag);
26484        __tmp.put_i16_le(self.ymag);
26485        __tmp.put_i16_le(self.zmag);
26486        if matches!(version, MavlinkVersion::V2) {
26487            __tmp.put_i16_le(self.temperature);
26488            let len = __tmp.len();
26489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26490        } else {
26491            __tmp.len()
26492        }
26493    }
26494}
26495#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26496#[doc = ""]
26497#[doc = "ID: 116"]
26498#[derive(Debug, Clone, PartialEq)]
26499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26501#[cfg_attr(feature = "ts", derive(TS))]
26502#[cfg_attr(feature = "ts", ts(export))]
26503pub struct SCALED_IMU2_DATA {
26504    #[doc = "Timestamp (time since system boot)."]
26505    pub time_boot_ms: u32,
26506    #[doc = "X acceleration"]
26507    pub xacc: i16,
26508    #[doc = "Y acceleration"]
26509    pub yacc: i16,
26510    #[doc = "Z acceleration"]
26511    pub zacc: i16,
26512    #[doc = "Angular speed around X axis"]
26513    pub xgyro: i16,
26514    #[doc = "Angular speed around Y axis"]
26515    pub ygyro: i16,
26516    #[doc = "Angular speed around Z axis"]
26517    pub zgyro: i16,
26518    #[doc = "X Magnetic field"]
26519    pub xmag: i16,
26520    #[doc = "Y Magnetic field"]
26521    pub ymag: i16,
26522    #[doc = "Z Magnetic field"]
26523    pub zmag: i16,
26524    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26525    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26526    pub temperature: i16,
26527}
26528impl SCALED_IMU2_DATA {
26529    pub const ENCODED_LEN: usize = 24usize;
26530    pub const DEFAULT: Self = Self {
26531        time_boot_ms: 0_u32,
26532        xacc: 0_i16,
26533        yacc: 0_i16,
26534        zacc: 0_i16,
26535        xgyro: 0_i16,
26536        ygyro: 0_i16,
26537        zgyro: 0_i16,
26538        xmag: 0_i16,
26539        ymag: 0_i16,
26540        zmag: 0_i16,
26541        temperature: 0_i16,
26542    };
26543    #[cfg(feature = "arbitrary")]
26544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26545        use arbitrary::{Arbitrary, Unstructured};
26546        let mut buf = [0u8; 1024];
26547        rng.fill_bytes(&mut buf);
26548        let mut unstructured = Unstructured::new(&buf);
26549        Self::arbitrary(&mut unstructured).unwrap_or_default()
26550    }
26551}
26552impl Default for SCALED_IMU2_DATA {
26553    fn default() -> Self {
26554        Self::DEFAULT.clone()
26555    }
26556}
26557impl MessageData for SCALED_IMU2_DATA {
26558    type Message = MavMessage;
26559    const ID: u32 = 116u32;
26560    const NAME: &'static str = "SCALED_IMU2";
26561    const EXTRA_CRC: u8 = 76u8;
26562    const ENCODED_LEN: usize = 24usize;
26563    fn deser(
26564        _version: MavlinkVersion,
26565        __input: &[u8],
26566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26567        let avail_len = __input.len();
26568        let mut payload_buf = [0; Self::ENCODED_LEN];
26569        let mut buf = if avail_len < Self::ENCODED_LEN {
26570            payload_buf[0..avail_len].copy_from_slice(__input);
26571            Bytes::new(&payload_buf)
26572        } else {
26573            Bytes::new(__input)
26574        };
26575        let mut __struct = Self::default();
26576        __struct.time_boot_ms = buf.get_u32_le();
26577        __struct.xacc = buf.get_i16_le();
26578        __struct.yacc = buf.get_i16_le();
26579        __struct.zacc = buf.get_i16_le();
26580        __struct.xgyro = buf.get_i16_le();
26581        __struct.ygyro = buf.get_i16_le();
26582        __struct.zgyro = buf.get_i16_le();
26583        __struct.xmag = buf.get_i16_le();
26584        __struct.ymag = buf.get_i16_le();
26585        __struct.zmag = buf.get_i16_le();
26586        __struct.temperature = buf.get_i16_le();
26587        Ok(__struct)
26588    }
26589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26590        let mut __tmp = BytesMut::new(bytes);
26591        #[allow(clippy::absurd_extreme_comparisons)]
26592        #[allow(unused_comparisons)]
26593        if __tmp.remaining() < Self::ENCODED_LEN {
26594            panic!(
26595                "buffer is too small (need {} bytes, but got {})",
26596                Self::ENCODED_LEN,
26597                __tmp.remaining(),
26598            )
26599        }
26600        __tmp.put_u32_le(self.time_boot_ms);
26601        __tmp.put_i16_le(self.xacc);
26602        __tmp.put_i16_le(self.yacc);
26603        __tmp.put_i16_le(self.zacc);
26604        __tmp.put_i16_le(self.xgyro);
26605        __tmp.put_i16_le(self.ygyro);
26606        __tmp.put_i16_le(self.zgyro);
26607        __tmp.put_i16_le(self.xmag);
26608        __tmp.put_i16_le(self.ymag);
26609        __tmp.put_i16_le(self.zmag);
26610        if matches!(version, MavlinkVersion::V2) {
26611            __tmp.put_i16_le(self.temperature);
26612            let len = __tmp.len();
26613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26614        } else {
26615            __tmp.len()
26616        }
26617    }
26618}
26619#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26620#[doc = ""]
26621#[doc = "ID: 129"]
26622#[derive(Debug, Clone, PartialEq)]
26623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26625#[cfg_attr(feature = "ts", derive(TS))]
26626#[cfg_attr(feature = "ts", ts(export))]
26627pub struct SCALED_IMU3_DATA {
26628    #[doc = "Timestamp (time since system boot)."]
26629    pub time_boot_ms: u32,
26630    #[doc = "X acceleration"]
26631    pub xacc: i16,
26632    #[doc = "Y acceleration"]
26633    pub yacc: i16,
26634    #[doc = "Z acceleration"]
26635    pub zacc: i16,
26636    #[doc = "Angular speed around X axis"]
26637    pub xgyro: i16,
26638    #[doc = "Angular speed around Y axis"]
26639    pub ygyro: i16,
26640    #[doc = "Angular speed around Z axis"]
26641    pub zgyro: i16,
26642    #[doc = "X Magnetic field"]
26643    pub xmag: i16,
26644    #[doc = "Y Magnetic field"]
26645    pub ymag: i16,
26646    #[doc = "Z Magnetic field"]
26647    pub zmag: i16,
26648    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26650    pub temperature: i16,
26651}
26652impl SCALED_IMU3_DATA {
26653    pub const ENCODED_LEN: usize = 24usize;
26654    pub const DEFAULT: Self = Self {
26655        time_boot_ms: 0_u32,
26656        xacc: 0_i16,
26657        yacc: 0_i16,
26658        zacc: 0_i16,
26659        xgyro: 0_i16,
26660        ygyro: 0_i16,
26661        zgyro: 0_i16,
26662        xmag: 0_i16,
26663        ymag: 0_i16,
26664        zmag: 0_i16,
26665        temperature: 0_i16,
26666    };
26667    #[cfg(feature = "arbitrary")]
26668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26669        use arbitrary::{Arbitrary, Unstructured};
26670        let mut buf = [0u8; 1024];
26671        rng.fill_bytes(&mut buf);
26672        let mut unstructured = Unstructured::new(&buf);
26673        Self::arbitrary(&mut unstructured).unwrap_or_default()
26674    }
26675}
26676impl Default for SCALED_IMU3_DATA {
26677    fn default() -> Self {
26678        Self::DEFAULT.clone()
26679    }
26680}
26681impl MessageData for SCALED_IMU3_DATA {
26682    type Message = MavMessage;
26683    const ID: u32 = 129u32;
26684    const NAME: &'static str = "SCALED_IMU3";
26685    const EXTRA_CRC: u8 = 46u8;
26686    const ENCODED_LEN: usize = 24usize;
26687    fn deser(
26688        _version: MavlinkVersion,
26689        __input: &[u8],
26690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26691        let avail_len = __input.len();
26692        let mut payload_buf = [0; Self::ENCODED_LEN];
26693        let mut buf = if avail_len < Self::ENCODED_LEN {
26694            payload_buf[0..avail_len].copy_from_slice(__input);
26695            Bytes::new(&payload_buf)
26696        } else {
26697            Bytes::new(__input)
26698        };
26699        let mut __struct = Self::default();
26700        __struct.time_boot_ms = buf.get_u32_le();
26701        __struct.xacc = buf.get_i16_le();
26702        __struct.yacc = buf.get_i16_le();
26703        __struct.zacc = buf.get_i16_le();
26704        __struct.xgyro = buf.get_i16_le();
26705        __struct.ygyro = buf.get_i16_le();
26706        __struct.zgyro = buf.get_i16_le();
26707        __struct.xmag = buf.get_i16_le();
26708        __struct.ymag = buf.get_i16_le();
26709        __struct.zmag = buf.get_i16_le();
26710        __struct.temperature = buf.get_i16_le();
26711        Ok(__struct)
26712    }
26713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26714        let mut __tmp = BytesMut::new(bytes);
26715        #[allow(clippy::absurd_extreme_comparisons)]
26716        #[allow(unused_comparisons)]
26717        if __tmp.remaining() < Self::ENCODED_LEN {
26718            panic!(
26719                "buffer is too small (need {} bytes, but got {})",
26720                Self::ENCODED_LEN,
26721                __tmp.remaining(),
26722            )
26723        }
26724        __tmp.put_u32_le(self.time_boot_ms);
26725        __tmp.put_i16_le(self.xacc);
26726        __tmp.put_i16_le(self.yacc);
26727        __tmp.put_i16_le(self.zacc);
26728        __tmp.put_i16_le(self.xgyro);
26729        __tmp.put_i16_le(self.ygyro);
26730        __tmp.put_i16_le(self.zgyro);
26731        __tmp.put_i16_le(self.xmag);
26732        __tmp.put_i16_le(self.ymag);
26733        __tmp.put_i16_le(self.zmag);
26734        if matches!(version, MavlinkVersion::V2) {
26735            __tmp.put_i16_le(self.temperature);
26736            let len = __tmp.len();
26737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26738        } else {
26739            __tmp.len()
26740        }
26741    }
26742}
26743#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26744#[doc = ""]
26745#[doc = "ID: 29"]
26746#[derive(Debug, Clone, PartialEq)]
26747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26749#[cfg_attr(feature = "ts", derive(TS))]
26750#[cfg_attr(feature = "ts", ts(export))]
26751pub struct SCALED_PRESSURE_DATA {
26752    #[doc = "Timestamp (time since system boot)."]
26753    pub time_boot_ms: u32,
26754    #[doc = "Absolute pressure"]
26755    pub press_abs: f32,
26756    #[doc = "Differential pressure 1"]
26757    pub press_diff: f32,
26758    #[doc = "Absolute pressure temperature"]
26759    pub temperature: i16,
26760    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26761    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26762    pub temperature_press_diff: i16,
26763}
26764impl SCALED_PRESSURE_DATA {
26765    pub const ENCODED_LEN: usize = 16usize;
26766    pub const DEFAULT: Self = Self {
26767        time_boot_ms: 0_u32,
26768        press_abs: 0.0_f32,
26769        press_diff: 0.0_f32,
26770        temperature: 0_i16,
26771        temperature_press_diff: 0_i16,
26772    };
26773    #[cfg(feature = "arbitrary")]
26774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26775        use arbitrary::{Arbitrary, Unstructured};
26776        let mut buf = [0u8; 1024];
26777        rng.fill_bytes(&mut buf);
26778        let mut unstructured = Unstructured::new(&buf);
26779        Self::arbitrary(&mut unstructured).unwrap_or_default()
26780    }
26781}
26782impl Default for SCALED_PRESSURE_DATA {
26783    fn default() -> Self {
26784        Self::DEFAULT.clone()
26785    }
26786}
26787impl MessageData for SCALED_PRESSURE_DATA {
26788    type Message = MavMessage;
26789    const ID: u32 = 29u32;
26790    const NAME: &'static str = "SCALED_PRESSURE";
26791    const EXTRA_CRC: u8 = 115u8;
26792    const ENCODED_LEN: usize = 16usize;
26793    fn deser(
26794        _version: MavlinkVersion,
26795        __input: &[u8],
26796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26797        let avail_len = __input.len();
26798        let mut payload_buf = [0; Self::ENCODED_LEN];
26799        let mut buf = if avail_len < Self::ENCODED_LEN {
26800            payload_buf[0..avail_len].copy_from_slice(__input);
26801            Bytes::new(&payload_buf)
26802        } else {
26803            Bytes::new(__input)
26804        };
26805        let mut __struct = Self::default();
26806        __struct.time_boot_ms = buf.get_u32_le();
26807        __struct.press_abs = buf.get_f32_le();
26808        __struct.press_diff = buf.get_f32_le();
26809        __struct.temperature = buf.get_i16_le();
26810        __struct.temperature_press_diff = buf.get_i16_le();
26811        Ok(__struct)
26812    }
26813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26814        let mut __tmp = BytesMut::new(bytes);
26815        #[allow(clippy::absurd_extreme_comparisons)]
26816        #[allow(unused_comparisons)]
26817        if __tmp.remaining() < Self::ENCODED_LEN {
26818            panic!(
26819                "buffer is too small (need {} bytes, but got {})",
26820                Self::ENCODED_LEN,
26821                __tmp.remaining(),
26822            )
26823        }
26824        __tmp.put_u32_le(self.time_boot_ms);
26825        __tmp.put_f32_le(self.press_abs);
26826        __tmp.put_f32_le(self.press_diff);
26827        __tmp.put_i16_le(self.temperature);
26828        if matches!(version, MavlinkVersion::V2) {
26829            __tmp.put_i16_le(self.temperature_press_diff);
26830            let len = __tmp.len();
26831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26832        } else {
26833            __tmp.len()
26834        }
26835    }
26836}
26837#[doc = "Barometer readings for 2nd barometer."]
26838#[doc = ""]
26839#[doc = "ID: 137"]
26840#[derive(Debug, Clone, PartialEq)]
26841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26843#[cfg_attr(feature = "ts", derive(TS))]
26844#[cfg_attr(feature = "ts", ts(export))]
26845pub struct SCALED_PRESSURE2_DATA {
26846    #[doc = "Timestamp (time since system boot)."]
26847    pub time_boot_ms: u32,
26848    #[doc = "Absolute pressure"]
26849    pub press_abs: f32,
26850    #[doc = "Differential pressure"]
26851    pub press_diff: f32,
26852    #[doc = "Absolute pressure temperature"]
26853    pub temperature: i16,
26854    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26856    pub temperature_press_diff: i16,
26857}
26858impl SCALED_PRESSURE2_DATA {
26859    pub const ENCODED_LEN: usize = 16usize;
26860    pub const DEFAULT: Self = Self {
26861        time_boot_ms: 0_u32,
26862        press_abs: 0.0_f32,
26863        press_diff: 0.0_f32,
26864        temperature: 0_i16,
26865        temperature_press_diff: 0_i16,
26866    };
26867    #[cfg(feature = "arbitrary")]
26868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26869        use arbitrary::{Arbitrary, Unstructured};
26870        let mut buf = [0u8; 1024];
26871        rng.fill_bytes(&mut buf);
26872        let mut unstructured = Unstructured::new(&buf);
26873        Self::arbitrary(&mut unstructured).unwrap_or_default()
26874    }
26875}
26876impl Default for SCALED_PRESSURE2_DATA {
26877    fn default() -> Self {
26878        Self::DEFAULT.clone()
26879    }
26880}
26881impl MessageData for SCALED_PRESSURE2_DATA {
26882    type Message = MavMessage;
26883    const ID: u32 = 137u32;
26884    const NAME: &'static str = "SCALED_PRESSURE2";
26885    const EXTRA_CRC: u8 = 195u8;
26886    const ENCODED_LEN: usize = 16usize;
26887    fn deser(
26888        _version: MavlinkVersion,
26889        __input: &[u8],
26890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26891        let avail_len = __input.len();
26892        let mut payload_buf = [0; Self::ENCODED_LEN];
26893        let mut buf = if avail_len < Self::ENCODED_LEN {
26894            payload_buf[0..avail_len].copy_from_slice(__input);
26895            Bytes::new(&payload_buf)
26896        } else {
26897            Bytes::new(__input)
26898        };
26899        let mut __struct = Self::default();
26900        __struct.time_boot_ms = buf.get_u32_le();
26901        __struct.press_abs = buf.get_f32_le();
26902        __struct.press_diff = buf.get_f32_le();
26903        __struct.temperature = buf.get_i16_le();
26904        __struct.temperature_press_diff = buf.get_i16_le();
26905        Ok(__struct)
26906    }
26907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26908        let mut __tmp = BytesMut::new(bytes);
26909        #[allow(clippy::absurd_extreme_comparisons)]
26910        #[allow(unused_comparisons)]
26911        if __tmp.remaining() < Self::ENCODED_LEN {
26912            panic!(
26913                "buffer is too small (need {} bytes, but got {})",
26914                Self::ENCODED_LEN,
26915                __tmp.remaining(),
26916            )
26917        }
26918        __tmp.put_u32_le(self.time_boot_ms);
26919        __tmp.put_f32_le(self.press_abs);
26920        __tmp.put_f32_le(self.press_diff);
26921        __tmp.put_i16_le(self.temperature);
26922        if matches!(version, MavlinkVersion::V2) {
26923            __tmp.put_i16_le(self.temperature_press_diff);
26924            let len = __tmp.len();
26925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26926        } else {
26927            __tmp.len()
26928        }
26929    }
26930}
26931#[doc = "Barometer readings for 3rd barometer."]
26932#[doc = ""]
26933#[doc = "ID: 143"]
26934#[derive(Debug, Clone, PartialEq)]
26935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26937#[cfg_attr(feature = "ts", derive(TS))]
26938#[cfg_attr(feature = "ts", ts(export))]
26939pub struct SCALED_PRESSURE3_DATA {
26940    #[doc = "Timestamp (time since system boot)."]
26941    pub time_boot_ms: u32,
26942    #[doc = "Absolute pressure"]
26943    pub press_abs: f32,
26944    #[doc = "Differential pressure"]
26945    pub press_diff: f32,
26946    #[doc = "Absolute pressure temperature"]
26947    pub temperature: i16,
26948    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26949    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26950    pub temperature_press_diff: i16,
26951}
26952impl SCALED_PRESSURE3_DATA {
26953    pub const ENCODED_LEN: usize = 16usize;
26954    pub const DEFAULT: Self = Self {
26955        time_boot_ms: 0_u32,
26956        press_abs: 0.0_f32,
26957        press_diff: 0.0_f32,
26958        temperature: 0_i16,
26959        temperature_press_diff: 0_i16,
26960    };
26961    #[cfg(feature = "arbitrary")]
26962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26963        use arbitrary::{Arbitrary, Unstructured};
26964        let mut buf = [0u8; 1024];
26965        rng.fill_bytes(&mut buf);
26966        let mut unstructured = Unstructured::new(&buf);
26967        Self::arbitrary(&mut unstructured).unwrap_or_default()
26968    }
26969}
26970impl Default for SCALED_PRESSURE3_DATA {
26971    fn default() -> Self {
26972        Self::DEFAULT.clone()
26973    }
26974}
26975impl MessageData for SCALED_PRESSURE3_DATA {
26976    type Message = MavMessage;
26977    const ID: u32 = 143u32;
26978    const NAME: &'static str = "SCALED_PRESSURE3";
26979    const EXTRA_CRC: u8 = 131u8;
26980    const ENCODED_LEN: usize = 16usize;
26981    fn deser(
26982        _version: MavlinkVersion,
26983        __input: &[u8],
26984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26985        let avail_len = __input.len();
26986        let mut payload_buf = [0; Self::ENCODED_LEN];
26987        let mut buf = if avail_len < Self::ENCODED_LEN {
26988            payload_buf[0..avail_len].copy_from_slice(__input);
26989            Bytes::new(&payload_buf)
26990        } else {
26991            Bytes::new(__input)
26992        };
26993        let mut __struct = Self::default();
26994        __struct.time_boot_ms = buf.get_u32_le();
26995        __struct.press_abs = buf.get_f32_le();
26996        __struct.press_diff = buf.get_f32_le();
26997        __struct.temperature = buf.get_i16_le();
26998        __struct.temperature_press_diff = buf.get_i16_le();
26999        Ok(__struct)
27000    }
27001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27002        let mut __tmp = BytesMut::new(bytes);
27003        #[allow(clippy::absurd_extreme_comparisons)]
27004        #[allow(unused_comparisons)]
27005        if __tmp.remaining() < Self::ENCODED_LEN {
27006            panic!(
27007                "buffer is too small (need {} bytes, but got {})",
27008                Self::ENCODED_LEN,
27009                __tmp.remaining(),
27010            )
27011        }
27012        __tmp.put_u32_le(self.time_boot_ms);
27013        __tmp.put_f32_le(self.press_abs);
27014        __tmp.put_f32_le(self.press_diff);
27015        __tmp.put_i16_le(self.temperature);
27016        if matches!(version, MavlinkVersion::V2) {
27017            __tmp.put_i16_le(self.temperature_press_diff);
27018            let len = __tmp.len();
27019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27020        } else {
27021            __tmp.len()
27022        }
27023    }
27024}
27025#[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
27026#[doc = ""]
27027#[doc = "ID: 183"]
27028#[derive(Debug, Clone, PartialEq)]
27029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27031#[cfg_attr(feature = "ts", derive(TS))]
27032#[cfg_attr(feature = "ts", ts(export))]
27033pub struct SCRIPT_COUNT_DATA {
27034    #[doc = "Number of script items in the sequence"]
27035    pub count: u16,
27036    #[doc = "System ID"]
27037    pub target_system: u8,
27038    #[doc = "Component ID"]
27039    pub target_component: u8,
27040}
27041impl SCRIPT_COUNT_DATA {
27042    pub const ENCODED_LEN: usize = 4usize;
27043    pub const DEFAULT: Self = Self {
27044        count: 0_u16,
27045        target_system: 0_u8,
27046        target_component: 0_u8,
27047    };
27048    #[cfg(feature = "arbitrary")]
27049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27050        use arbitrary::{Arbitrary, Unstructured};
27051        let mut buf = [0u8; 1024];
27052        rng.fill_bytes(&mut buf);
27053        let mut unstructured = Unstructured::new(&buf);
27054        Self::arbitrary(&mut unstructured).unwrap_or_default()
27055    }
27056}
27057impl Default for SCRIPT_COUNT_DATA {
27058    fn default() -> Self {
27059        Self::DEFAULT.clone()
27060    }
27061}
27062impl MessageData for SCRIPT_COUNT_DATA {
27063    type Message = MavMessage;
27064    const ID: u32 = 183u32;
27065    const NAME: &'static str = "SCRIPT_COUNT";
27066    const EXTRA_CRC: u8 = 186u8;
27067    const ENCODED_LEN: usize = 4usize;
27068    fn deser(
27069        _version: MavlinkVersion,
27070        __input: &[u8],
27071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27072        let avail_len = __input.len();
27073        let mut payload_buf = [0; Self::ENCODED_LEN];
27074        let mut buf = if avail_len < Self::ENCODED_LEN {
27075            payload_buf[0..avail_len].copy_from_slice(__input);
27076            Bytes::new(&payload_buf)
27077        } else {
27078            Bytes::new(__input)
27079        };
27080        let mut __struct = Self::default();
27081        __struct.count = buf.get_u16_le();
27082        __struct.target_system = buf.get_u8();
27083        __struct.target_component = buf.get_u8();
27084        Ok(__struct)
27085    }
27086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27087        let mut __tmp = BytesMut::new(bytes);
27088        #[allow(clippy::absurd_extreme_comparisons)]
27089        #[allow(unused_comparisons)]
27090        if __tmp.remaining() < Self::ENCODED_LEN {
27091            panic!(
27092                "buffer is too small (need {} bytes, but got {})",
27093                Self::ENCODED_LEN,
27094                __tmp.remaining(),
27095            )
27096        }
27097        __tmp.put_u16_le(self.count);
27098        __tmp.put_u8(self.target_system);
27099        __tmp.put_u8(self.target_component);
27100        if matches!(version, MavlinkVersion::V2) {
27101            let len = __tmp.len();
27102            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27103        } else {
27104            __tmp.len()
27105        }
27106    }
27107}
27108#[doc = "This message informs about the currently active SCRIPT."]
27109#[doc = ""]
27110#[doc = "ID: 184"]
27111#[derive(Debug, Clone, PartialEq)]
27112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27114#[cfg_attr(feature = "ts", derive(TS))]
27115#[cfg_attr(feature = "ts", ts(export))]
27116pub struct SCRIPT_CURRENT_DATA {
27117    #[doc = "Active Sequence"]
27118    pub seq: u16,
27119}
27120impl SCRIPT_CURRENT_DATA {
27121    pub const ENCODED_LEN: usize = 2usize;
27122    pub const DEFAULT: Self = Self { seq: 0_u16 };
27123    #[cfg(feature = "arbitrary")]
27124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27125        use arbitrary::{Arbitrary, Unstructured};
27126        let mut buf = [0u8; 1024];
27127        rng.fill_bytes(&mut buf);
27128        let mut unstructured = Unstructured::new(&buf);
27129        Self::arbitrary(&mut unstructured).unwrap_or_default()
27130    }
27131}
27132impl Default for SCRIPT_CURRENT_DATA {
27133    fn default() -> Self {
27134        Self::DEFAULT.clone()
27135    }
27136}
27137impl MessageData for SCRIPT_CURRENT_DATA {
27138    type Message = MavMessage;
27139    const ID: u32 = 184u32;
27140    const NAME: &'static str = "SCRIPT_CURRENT";
27141    const EXTRA_CRC: u8 = 40u8;
27142    const ENCODED_LEN: usize = 2usize;
27143    fn deser(
27144        _version: MavlinkVersion,
27145        __input: &[u8],
27146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27147        let avail_len = __input.len();
27148        let mut payload_buf = [0; Self::ENCODED_LEN];
27149        let mut buf = if avail_len < Self::ENCODED_LEN {
27150            payload_buf[0..avail_len].copy_from_slice(__input);
27151            Bytes::new(&payload_buf)
27152        } else {
27153            Bytes::new(__input)
27154        };
27155        let mut __struct = Self::default();
27156        __struct.seq = buf.get_u16_le();
27157        Ok(__struct)
27158    }
27159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27160        let mut __tmp = BytesMut::new(bytes);
27161        #[allow(clippy::absurd_extreme_comparisons)]
27162        #[allow(unused_comparisons)]
27163        if __tmp.remaining() < Self::ENCODED_LEN {
27164            panic!(
27165                "buffer is too small (need {} bytes, but got {})",
27166                Self::ENCODED_LEN,
27167                __tmp.remaining(),
27168            )
27169        }
27170        __tmp.put_u16_le(self.seq);
27171        if matches!(version, MavlinkVersion::V2) {
27172            let len = __tmp.len();
27173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27174        } else {
27175            __tmp.len()
27176        }
27177    }
27178}
27179#[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
27180#[doc = ""]
27181#[doc = "ID: 180"]
27182#[derive(Debug, Clone, PartialEq)]
27183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27185#[cfg_attr(feature = "ts", derive(TS))]
27186#[cfg_attr(feature = "ts", ts(export))]
27187pub struct SCRIPT_ITEM_DATA {
27188    #[doc = "Sequence"]
27189    pub seq: u16,
27190    #[doc = "System ID"]
27191    pub target_system: u8,
27192    #[doc = "Component ID"]
27193    pub target_component: u8,
27194    #[doc = "The name of the mission script, NULL terminated."]
27195    #[cfg_attr(feature = "ts", ts(type = "string"))]
27196    pub name: CharArray<50>,
27197}
27198impl SCRIPT_ITEM_DATA {
27199    pub const ENCODED_LEN: usize = 54usize;
27200    pub const DEFAULT: Self = Self {
27201        seq: 0_u16,
27202        target_system: 0_u8,
27203        target_component: 0_u8,
27204        name: CharArray::new([0_u8; 50usize]),
27205    };
27206    #[cfg(feature = "arbitrary")]
27207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27208        use arbitrary::{Arbitrary, Unstructured};
27209        let mut buf = [0u8; 1024];
27210        rng.fill_bytes(&mut buf);
27211        let mut unstructured = Unstructured::new(&buf);
27212        Self::arbitrary(&mut unstructured).unwrap_or_default()
27213    }
27214}
27215impl Default for SCRIPT_ITEM_DATA {
27216    fn default() -> Self {
27217        Self::DEFAULT.clone()
27218    }
27219}
27220impl MessageData for SCRIPT_ITEM_DATA {
27221    type Message = MavMessage;
27222    const ID: u32 = 180u32;
27223    const NAME: &'static str = "SCRIPT_ITEM";
27224    const EXTRA_CRC: u8 = 231u8;
27225    const ENCODED_LEN: usize = 54usize;
27226    fn deser(
27227        _version: MavlinkVersion,
27228        __input: &[u8],
27229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27230        let avail_len = __input.len();
27231        let mut payload_buf = [0; Self::ENCODED_LEN];
27232        let mut buf = if avail_len < Self::ENCODED_LEN {
27233            payload_buf[0..avail_len].copy_from_slice(__input);
27234            Bytes::new(&payload_buf)
27235        } else {
27236            Bytes::new(__input)
27237        };
27238        let mut __struct = Self::default();
27239        __struct.seq = buf.get_u16_le();
27240        __struct.target_system = buf.get_u8();
27241        __struct.target_component = buf.get_u8();
27242        let mut tmp = [0_u8; 50usize];
27243        for v in &mut tmp {
27244            *v = buf.get_u8();
27245        }
27246        __struct.name = CharArray::new(tmp);
27247        Ok(__struct)
27248    }
27249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27250        let mut __tmp = BytesMut::new(bytes);
27251        #[allow(clippy::absurd_extreme_comparisons)]
27252        #[allow(unused_comparisons)]
27253        if __tmp.remaining() < Self::ENCODED_LEN {
27254            panic!(
27255                "buffer is too small (need {} bytes, but got {})",
27256                Self::ENCODED_LEN,
27257                __tmp.remaining(),
27258            )
27259        }
27260        __tmp.put_u16_le(self.seq);
27261        __tmp.put_u8(self.target_system);
27262        __tmp.put_u8(self.target_component);
27263        for val in &self.name {
27264            __tmp.put_u8(*val);
27265        }
27266        if matches!(version, MavlinkVersion::V2) {
27267            let len = __tmp.len();
27268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27269        } else {
27270            __tmp.len()
27271        }
27272    }
27273}
27274#[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
27275#[doc = ""]
27276#[doc = "ID: 181"]
27277#[derive(Debug, Clone, PartialEq)]
27278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27280#[cfg_attr(feature = "ts", derive(TS))]
27281#[cfg_attr(feature = "ts", ts(export))]
27282pub struct SCRIPT_REQUEST_DATA {
27283    #[doc = "Sequence"]
27284    pub seq: u16,
27285    #[doc = "System ID"]
27286    pub target_system: u8,
27287    #[doc = "Component ID"]
27288    pub target_component: u8,
27289}
27290impl SCRIPT_REQUEST_DATA {
27291    pub const ENCODED_LEN: usize = 4usize;
27292    pub const DEFAULT: Self = Self {
27293        seq: 0_u16,
27294        target_system: 0_u8,
27295        target_component: 0_u8,
27296    };
27297    #[cfg(feature = "arbitrary")]
27298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27299        use arbitrary::{Arbitrary, Unstructured};
27300        let mut buf = [0u8; 1024];
27301        rng.fill_bytes(&mut buf);
27302        let mut unstructured = Unstructured::new(&buf);
27303        Self::arbitrary(&mut unstructured).unwrap_or_default()
27304    }
27305}
27306impl Default for SCRIPT_REQUEST_DATA {
27307    fn default() -> Self {
27308        Self::DEFAULT.clone()
27309    }
27310}
27311impl MessageData for SCRIPT_REQUEST_DATA {
27312    type Message = MavMessage;
27313    const ID: u32 = 181u32;
27314    const NAME: &'static str = "SCRIPT_REQUEST";
27315    const EXTRA_CRC: u8 = 129u8;
27316    const ENCODED_LEN: usize = 4usize;
27317    fn deser(
27318        _version: MavlinkVersion,
27319        __input: &[u8],
27320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27321        let avail_len = __input.len();
27322        let mut payload_buf = [0; Self::ENCODED_LEN];
27323        let mut buf = if avail_len < Self::ENCODED_LEN {
27324            payload_buf[0..avail_len].copy_from_slice(__input);
27325            Bytes::new(&payload_buf)
27326        } else {
27327            Bytes::new(__input)
27328        };
27329        let mut __struct = Self::default();
27330        __struct.seq = buf.get_u16_le();
27331        __struct.target_system = buf.get_u8();
27332        __struct.target_component = buf.get_u8();
27333        Ok(__struct)
27334    }
27335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27336        let mut __tmp = BytesMut::new(bytes);
27337        #[allow(clippy::absurd_extreme_comparisons)]
27338        #[allow(unused_comparisons)]
27339        if __tmp.remaining() < Self::ENCODED_LEN {
27340            panic!(
27341                "buffer is too small (need {} bytes, but got {})",
27342                Self::ENCODED_LEN,
27343                __tmp.remaining(),
27344            )
27345        }
27346        __tmp.put_u16_le(self.seq);
27347        __tmp.put_u8(self.target_system);
27348        __tmp.put_u8(self.target_component);
27349        if matches!(version, MavlinkVersion::V2) {
27350            let len = __tmp.len();
27351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27352        } else {
27353            __tmp.len()
27354        }
27355    }
27356}
27357#[doc = "Request the overall list of mission items from the system/component."]
27358#[doc = ""]
27359#[doc = "ID: 182"]
27360#[derive(Debug, Clone, PartialEq)]
27361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27363#[cfg_attr(feature = "ts", derive(TS))]
27364#[cfg_attr(feature = "ts", ts(export))]
27365pub struct SCRIPT_REQUEST_LIST_DATA {
27366    #[doc = "System ID"]
27367    pub target_system: u8,
27368    #[doc = "Component ID"]
27369    pub target_component: u8,
27370}
27371impl SCRIPT_REQUEST_LIST_DATA {
27372    pub const ENCODED_LEN: usize = 2usize;
27373    pub const DEFAULT: Self = Self {
27374        target_system: 0_u8,
27375        target_component: 0_u8,
27376    };
27377    #[cfg(feature = "arbitrary")]
27378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27379        use arbitrary::{Arbitrary, Unstructured};
27380        let mut buf = [0u8; 1024];
27381        rng.fill_bytes(&mut buf);
27382        let mut unstructured = Unstructured::new(&buf);
27383        Self::arbitrary(&mut unstructured).unwrap_or_default()
27384    }
27385}
27386impl Default for SCRIPT_REQUEST_LIST_DATA {
27387    fn default() -> Self {
27388        Self::DEFAULT.clone()
27389    }
27390}
27391impl MessageData for SCRIPT_REQUEST_LIST_DATA {
27392    type Message = MavMessage;
27393    const ID: u32 = 182u32;
27394    const NAME: &'static str = "SCRIPT_REQUEST_LIST";
27395    const EXTRA_CRC: u8 = 115u8;
27396    const ENCODED_LEN: usize = 2usize;
27397    fn deser(
27398        _version: MavlinkVersion,
27399        __input: &[u8],
27400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27401        let avail_len = __input.len();
27402        let mut payload_buf = [0; Self::ENCODED_LEN];
27403        let mut buf = if avail_len < Self::ENCODED_LEN {
27404            payload_buf[0..avail_len].copy_from_slice(__input);
27405            Bytes::new(&payload_buf)
27406        } else {
27407            Bytes::new(__input)
27408        };
27409        let mut __struct = Self::default();
27410        __struct.target_system = buf.get_u8();
27411        __struct.target_component = buf.get_u8();
27412        Ok(__struct)
27413    }
27414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27415        let mut __tmp = BytesMut::new(bytes);
27416        #[allow(clippy::absurd_extreme_comparisons)]
27417        #[allow(unused_comparisons)]
27418        if __tmp.remaining() < Self::ENCODED_LEN {
27419            panic!(
27420                "buffer is too small (need {} bytes, but got {})",
27421                Self::ENCODED_LEN,
27422                __tmp.remaining(),
27423            )
27424        }
27425        __tmp.put_u8(self.target_system);
27426        __tmp.put_u8(self.target_component);
27427        if matches!(version, MavlinkVersion::V2) {
27428            let len = __tmp.len();
27429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27430        } else {
27431            __tmp.len()
27432        }
27433    }
27434}
27435#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27436#[doc = ""]
27437#[doc = "ID: 126"]
27438#[derive(Debug, Clone, PartialEq)]
27439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27441#[cfg_attr(feature = "ts", derive(TS))]
27442#[cfg_attr(feature = "ts", ts(export))]
27443pub struct SERIAL_CONTROL_DATA {
27444    #[doc = "Baudrate of transfer. Zero means no change."]
27445    pub baudrate: u32,
27446    #[doc = "Timeout for reply data"]
27447    pub timeout: u16,
27448    #[doc = "Serial control device type."]
27449    pub device: SerialControlDev,
27450    #[doc = "Bitmap of serial control flags."]
27451    pub flags: SerialControlFlag,
27452    #[doc = "how many bytes in this transfer"]
27453    pub count: u8,
27454    #[doc = "serial data"]
27455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27456    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27457    pub data: [u8; 70],
27458    #[doc = "System ID"]
27459    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27460    pub target_system: u8,
27461    #[doc = "Component ID"]
27462    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27463    pub target_component: u8,
27464}
27465impl SERIAL_CONTROL_DATA {
27466    pub const ENCODED_LEN: usize = 81usize;
27467    pub const DEFAULT: Self = Self {
27468        baudrate: 0_u32,
27469        timeout: 0_u16,
27470        device: SerialControlDev::DEFAULT,
27471        flags: SerialControlFlag::DEFAULT,
27472        count: 0_u8,
27473        data: [0_u8; 70usize],
27474        target_system: 0_u8,
27475        target_component: 0_u8,
27476    };
27477    #[cfg(feature = "arbitrary")]
27478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27479        use arbitrary::{Arbitrary, Unstructured};
27480        let mut buf = [0u8; 1024];
27481        rng.fill_bytes(&mut buf);
27482        let mut unstructured = Unstructured::new(&buf);
27483        Self::arbitrary(&mut unstructured).unwrap_or_default()
27484    }
27485}
27486impl Default for SERIAL_CONTROL_DATA {
27487    fn default() -> Self {
27488        Self::DEFAULT.clone()
27489    }
27490}
27491impl MessageData for SERIAL_CONTROL_DATA {
27492    type Message = MavMessage;
27493    const ID: u32 = 126u32;
27494    const NAME: &'static str = "SERIAL_CONTROL";
27495    const EXTRA_CRC: u8 = 220u8;
27496    const ENCODED_LEN: usize = 81usize;
27497    fn deser(
27498        _version: MavlinkVersion,
27499        __input: &[u8],
27500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27501        let avail_len = __input.len();
27502        let mut payload_buf = [0; Self::ENCODED_LEN];
27503        let mut buf = if avail_len < Self::ENCODED_LEN {
27504            payload_buf[0..avail_len].copy_from_slice(__input);
27505            Bytes::new(&payload_buf)
27506        } else {
27507            Bytes::new(__input)
27508        };
27509        let mut __struct = Self::default();
27510        __struct.baudrate = buf.get_u32_le();
27511        __struct.timeout = buf.get_u16_le();
27512        let tmp = buf.get_u8();
27513        __struct.device =
27514            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27515                enum_type: "SerialControlDev",
27516                value: tmp as u64,
27517            })?;
27518        let tmp = buf.get_u8();
27519        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27520            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27521                flag_type: "SerialControlFlag",
27522                value: tmp as u64,
27523            })?;
27524        __struct.count = buf.get_u8();
27525        for v in &mut __struct.data {
27526            let val = buf.get_u8();
27527            *v = val;
27528        }
27529        __struct.target_system = buf.get_u8();
27530        __struct.target_component = buf.get_u8();
27531        Ok(__struct)
27532    }
27533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27534        let mut __tmp = BytesMut::new(bytes);
27535        #[allow(clippy::absurd_extreme_comparisons)]
27536        #[allow(unused_comparisons)]
27537        if __tmp.remaining() < Self::ENCODED_LEN {
27538            panic!(
27539                "buffer is too small (need {} bytes, but got {})",
27540                Self::ENCODED_LEN,
27541                __tmp.remaining(),
27542            )
27543        }
27544        __tmp.put_u32_le(self.baudrate);
27545        __tmp.put_u16_le(self.timeout);
27546        __tmp.put_u8(self.device as u8);
27547        __tmp.put_u8(self.flags.bits() as u8);
27548        __tmp.put_u8(self.count);
27549        for val in &self.data {
27550            __tmp.put_u8(*val);
27551        }
27552        if matches!(version, MavlinkVersion::V2) {
27553            __tmp.put_u8(self.target_system);
27554            __tmp.put_u8(self.target_component);
27555            let len = __tmp.len();
27556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27557        } else {
27558            __tmp.len()
27559        }
27560    }
27561}
27562#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27563#[doc = ""]
27564#[doc = "ID: 36"]
27565#[derive(Debug, Clone, PartialEq)]
27566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27568#[cfg_attr(feature = "ts", derive(TS))]
27569#[cfg_attr(feature = "ts", ts(export))]
27570pub struct SERVO_OUTPUT_RAW_DATA {
27571    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27572    pub time_usec: u32,
27573    #[doc = "Servo output 1 value"]
27574    pub servo1_raw: u16,
27575    #[doc = "Servo output 2 value"]
27576    pub servo2_raw: u16,
27577    #[doc = "Servo output 3 value"]
27578    pub servo3_raw: u16,
27579    #[doc = "Servo output 4 value"]
27580    pub servo4_raw: u16,
27581    #[doc = "Servo output 5 value"]
27582    pub servo5_raw: u16,
27583    #[doc = "Servo output 6 value"]
27584    pub servo6_raw: u16,
27585    #[doc = "Servo output 7 value"]
27586    pub servo7_raw: u16,
27587    #[doc = "Servo output 8 value"]
27588    pub servo8_raw: u16,
27589    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27590    pub port: u8,
27591    #[doc = "Servo output 9 value"]
27592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27593    pub servo9_raw: u16,
27594    #[doc = "Servo output 10 value"]
27595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27596    pub servo10_raw: u16,
27597    #[doc = "Servo output 11 value"]
27598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27599    pub servo11_raw: u16,
27600    #[doc = "Servo output 12 value"]
27601    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27602    pub servo12_raw: u16,
27603    #[doc = "Servo output 13 value"]
27604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27605    pub servo13_raw: u16,
27606    #[doc = "Servo output 14 value"]
27607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27608    pub servo14_raw: u16,
27609    #[doc = "Servo output 15 value"]
27610    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27611    pub servo15_raw: u16,
27612    #[doc = "Servo output 16 value"]
27613    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27614    pub servo16_raw: u16,
27615}
27616impl SERVO_OUTPUT_RAW_DATA {
27617    pub const ENCODED_LEN: usize = 37usize;
27618    pub const DEFAULT: Self = Self {
27619        time_usec: 0_u32,
27620        servo1_raw: 0_u16,
27621        servo2_raw: 0_u16,
27622        servo3_raw: 0_u16,
27623        servo4_raw: 0_u16,
27624        servo5_raw: 0_u16,
27625        servo6_raw: 0_u16,
27626        servo7_raw: 0_u16,
27627        servo8_raw: 0_u16,
27628        port: 0_u8,
27629        servo9_raw: 0_u16,
27630        servo10_raw: 0_u16,
27631        servo11_raw: 0_u16,
27632        servo12_raw: 0_u16,
27633        servo13_raw: 0_u16,
27634        servo14_raw: 0_u16,
27635        servo15_raw: 0_u16,
27636        servo16_raw: 0_u16,
27637    };
27638    #[cfg(feature = "arbitrary")]
27639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27640        use arbitrary::{Arbitrary, Unstructured};
27641        let mut buf = [0u8; 1024];
27642        rng.fill_bytes(&mut buf);
27643        let mut unstructured = Unstructured::new(&buf);
27644        Self::arbitrary(&mut unstructured).unwrap_or_default()
27645    }
27646}
27647impl Default for SERVO_OUTPUT_RAW_DATA {
27648    fn default() -> Self {
27649        Self::DEFAULT.clone()
27650    }
27651}
27652impl MessageData for SERVO_OUTPUT_RAW_DATA {
27653    type Message = MavMessage;
27654    const ID: u32 = 36u32;
27655    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27656    const EXTRA_CRC: u8 = 222u8;
27657    const ENCODED_LEN: usize = 37usize;
27658    fn deser(
27659        _version: MavlinkVersion,
27660        __input: &[u8],
27661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27662        let avail_len = __input.len();
27663        let mut payload_buf = [0; Self::ENCODED_LEN];
27664        let mut buf = if avail_len < Self::ENCODED_LEN {
27665            payload_buf[0..avail_len].copy_from_slice(__input);
27666            Bytes::new(&payload_buf)
27667        } else {
27668            Bytes::new(__input)
27669        };
27670        let mut __struct = Self::default();
27671        __struct.time_usec = buf.get_u32_le();
27672        __struct.servo1_raw = buf.get_u16_le();
27673        __struct.servo2_raw = buf.get_u16_le();
27674        __struct.servo3_raw = buf.get_u16_le();
27675        __struct.servo4_raw = buf.get_u16_le();
27676        __struct.servo5_raw = buf.get_u16_le();
27677        __struct.servo6_raw = buf.get_u16_le();
27678        __struct.servo7_raw = buf.get_u16_le();
27679        __struct.servo8_raw = buf.get_u16_le();
27680        __struct.port = buf.get_u8();
27681        __struct.servo9_raw = buf.get_u16_le();
27682        __struct.servo10_raw = buf.get_u16_le();
27683        __struct.servo11_raw = buf.get_u16_le();
27684        __struct.servo12_raw = buf.get_u16_le();
27685        __struct.servo13_raw = buf.get_u16_le();
27686        __struct.servo14_raw = buf.get_u16_le();
27687        __struct.servo15_raw = buf.get_u16_le();
27688        __struct.servo16_raw = buf.get_u16_le();
27689        Ok(__struct)
27690    }
27691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27692        let mut __tmp = BytesMut::new(bytes);
27693        #[allow(clippy::absurd_extreme_comparisons)]
27694        #[allow(unused_comparisons)]
27695        if __tmp.remaining() < Self::ENCODED_LEN {
27696            panic!(
27697                "buffer is too small (need {} bytes, but got {})",
27698                Self::ENCODED_LEN,
27699                __tmp.remaining(),
27700            )
27701        }
27702        __tmp.put_u32_le(self.time_usec);
27703        __tmp.put_u16_le(self.servo1_raw);
27704        __tmp.put_u16_le(self.servo2_raw);
27705        __tmp.put_u16_le(self.servo3_raw);
27706        __tmp.put_u16_le(self.servo4_raw);
27707        __tmp.put_u16_le(self.servo5_raw);
27708        __tmp.put_u16_le(self.servo6_raw);
27709        __tmp.put_u16_le(self.servo7_raw);
27710        __tmp.put_u16_le(self.servo8_raw);
27711        __tmp.put_u8(self.port);
27712        if matches!(version, MavlinkVersion::V2) {
27713            __tmp.put_u16_le(self.servo9_raw);
27714            __tmp.put_u16_le(self.servo10_raw);
27715            __tmp.put_u16_le(self.servo11_raw);
27716            __tmp.put_u16_le(self.servo12_raw);
27717            __tmp.put_u16_le(self.servo13_raw);
27718            __tmp.put_u16_le(self.servo14_raw);
27719            __tmp.put_u16_le(self.servo15_raw);
27720            __tmp.put_u16_le(self.servo16_raw);
27721            let len = __tmp.len();
27722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27723        } else {
27724            __tmp.len()
27725        }
27726    }
27727}
27728#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27729#[doc = ""]
27730#[doc = "ID: 256"]
27731#[derive(Debug, Clone, PartialEq)]
27732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27734#[cfg_attr(feature = "ts", derive(TS))]
27735#[cfg_attr(feature = "ts", ts(export))]
27736pub struct SETUP_SIGNING_DATA {
27737    #[doc = "initial timestamp"]
27738    pub initial_timestamp: u64,
27739    #[doc = "system id of the target"]
27740    pub target_system: u8,
27741    #[doc = "component ID of the target"]
27742    pub target_component: u8,
27743    #[doc = "signing key"]
27744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27746    pub secret_key: [u8; 32],
27747}
27748impl SETUP_SIGNING_DATA {
27749    pub const ENCODED_LEN: usize = 42usize;
27750    pub const DEFAULT: Self = Self {
27751        initial_timestamp: 0_u64,
27752        target_system: 0_u8,
27753        target_component: 0_u8,
27754        secret_key: [0_u8; 32usize],
27755    };
27756    #[cfg(feature = "arbitrary")]
27757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27758        use arbitrary::{Arbitrary, Unstructured};
27759        let mut buf = [0u8; 1024];
27760        rng.fill_bytes(&mut buf);
27761        let mut unstructured = Unstructured::new(&buf);
27762        Self::arbitrary(&mut unstructured).unwrap_or_default()
27763    }
27764}
27765impl Default for SETUP_SIGNING_DATA {
27766    fn default() -> Self {
27767        Self::DEFAULT.clone()
27768    }
27769}
27770impl MessageData for SETUP_SIGNING_DATA {
27771    type Message = MavMessage;
27772    const ID: u32 = 256u32;
27773    const NAME: &'static str = "SETUP_SIGNING";
27774    const EXTRA_CRC: u8 = 71u8;
27775    const ENCODED_LEN: usize = 42usize;
27776    fn deser(
27777        _version: MavlinkVersion,
27778        __input: &[u8],
27779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27780        let avail_len = __input.len();
27781        let mut payload_buf = [0; Self::ENCODED_LEN];
27782        let mut buf = if avail_len < Self::ENCODED_LEN {
27783            payload_buf[0..avail_len].copy_from_slice(__input);
27784            Bytes::new(&payload_buf)
27785        } else {
27786            Bytes::new(__input)
27787        };
27788        let mut __struct = Self::default();
27789        __struct.initial_timestamp = buf.get_u64_le();
27790        __struct.target_system = buf.get_u8();
27791        __struct.target_component = buf.get_u8();
27792        for v in &mut __struct.secret_key {
27793            let val = buf.get_u8();
27794            *v = val;
27795        }
27796        Ok(__struct)
27797    }
27798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27799        let mut __tmp = BytesMut::new(bytes);
27800        #[allow(clippy::absurd_extreme_comparisons)]
27801        #[allow(unused_comparisons)]
27802        if __tmp.remaining() < Self::ENCODED_LEN {
27803            panic!(
27804                "buffer is too small (need {} bytes, but got {})",
27805                Self::ENCODED_LEN,
27806                __tmp.remaining(),
27807            )
27808        }
27809        __tmp.put_u64_le(self.initial_timestamp);
27810        __tmp.put_u8(self.target_system);
27811        __tmp.put_u8(self.target_component);
27812        for val in &self.secret_key {
27813            __tmp.put_u8(*val);
27814        }
27815        if matches!(version, MavlinkVersion::V2) {
27816            let len = __tmp.len();
27817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27818        } else {
27819            __tmp.len()
27820        }
27821    }
27822}
27823#[doc = "Set the vehicle attitude and body angular rates."]
27824#[doc = ""]
27825#[doc = "ID: 139"]
27826#[derive(Debug, Clone, PartialEq)]
27827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27829#[cfg_attr(feature = "ts", derive(TS))]
27830#[cfg_attr(feature = "ts", ts(export))]
27831pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27832    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27833    pub time_usec: u64,
27834    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27836    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27837    pub controls: [f32; 8],
27838    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27839    pub group_mlx: u8,
27840    #[doc = "System ID"]
27841    pub target_system: u8,
27842    #[doc = "Component ID"]
27843    pub target_component: u8,
27844}
27845impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27846    pub const ENCODED_LEN: usize = 43usize;
27847    pub const DEFAULT: Self = Self {
27848        time_usec: 0_u64,
27849        controls: [0.0_f32; 8usize],
27850        group_mlx: 0_u8,
27851        target_system: 0_u8,
27852        target_component: 0_u8,
27853    };
27854    #[cfg(feature = "arbitrary")]
27855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27856        use arbitrary::{Arbitrary, Unstructured};
27857        let mut buf = [0u8; 1024];
27858        rng.fill_bytes(&mut buf);
27859        let mut unstructured = Unstructured::new(&buf);
27860        Self::arbitrary(&mut unstructured).unwrap_or_default()
27861    }
27862}
27863impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27864    fn default() -> Self {
27865        Self::DEFAULT.clone()
27866    }
27867}
27868impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27869    type Message = MavMessage;
27870    const ID: u32 = 139u32;
27871    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27872    const EXTRA_CRC: u8 = 168u8;
27873    const ENCODED_LEN: usize = 43usize;
27874    fn deser(
27875        _version: MavlinkVersion,
27876        __input: &[u8],
27877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27878        let avail_len = __input.len();
27879        let mut payload_buf = [0; Self::ENCODED_LEN];
27880        let mut buf = if avail_len < Self::ENCODED_LEN {
27881            payload_buf[0..avail_len].copy_from_slice(__input);
27882            Bytes::new(&payload_buf)
27883        } else {
27884            Bytes::new(__input)
27885        };
27886        let mut __struct = Self::default();
27887        __struct.time_usec = buf.get_u64_le();
27888        for v in &mut __struct.controls {
27889            let val = buf.get_f32_le();
27890            *v = val;
27891        }
27892        __struct.group_mlx = buf.get_u8();
27893        __struct.target_system = buf.get_u8();
27894        __struct.target_component = buf.get_u8();
27895        Ok(__struct)
27896    }
27897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27898        let mut __tmp = BytesMut::new(bytes);
27899        #[allow(clippy::absurd_extreme_comparisons)]
27900        #[allow(unused_comparisons)]
27901        if __tmp.remaining() < Self::ENCODED_LEN {
27902            panic!(
27903                "buffer is too small (need {} bytes, but got {})",
27904                Self::ENCODED_LEN,
27905                __tmp.remaining(),
27906            )
27907        }
27908        __tmp.put_u64_le(self.time_usec);
27909        for val in &self.controls {
27910            __tmp.put_f32_le(*val);
27911        }
27912        __tmp.put_u8(self.group_mlx);
27913        __tmp.put_u8(self.target_system);
27914        __tmp.put_u8(self.target_component);
27915        if matches!(version, MavlinkVersion::V2) {
27916            let len = __tmp.len();
27917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27918        } else {
27919            __tmp.len()
27920        }
27921    }
27922}
27923#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27924#[doc = ""]
27925#[doc = "ID: 82"]
27926#[derive(Debug, Clone, PartialEq)]
27927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27929#[cfg_attr(feature = "ts", derive(TS))]
27930#[cfg_attr(feature = "ts", ts(export))]
27931pub struct SET_ATTITUDE_TARGET_DATA {
27932    #[doc = "Timestamp (time since system boot)."]
27933    pub time_boot_ms: u32,
27934    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27935    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27936    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27937    pub q: [f32; 4],
27938    #[doc = "Body roll rate"]
27939    pub body_roll_rate: f32,
27940    #[doc = "Body pitch rate"]
27941    pub body_pitch_rate: f32,
27942    #[doc = "Body yaw rate"]
27943    pub body_yaw_rate: f32,
27944    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27945    pub thrust: f32,
27946    #[doc = "System ID"]
27947    pub target_system: u8,
27948    #[doc = "Component ID"]
27949    pub target_component: u8,
27950    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27951    pub type_mask: AttitudeTargetTypemask,
27952    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27956    pub thrust_body: [f32; 3],
27957}
27958impl SET_ATTITUDE_TARGET_DATA {
27959    pub const ENCODED_LEN: usize = 51usize;
27960    pub const DEFAULT: Self = Self {
27961        time_boot_ms: 0_u32,
27962        q: [0.0_f32; 4usize],
27963        body_roll_rate: 0.0_f32,
27964        body_pitch_rate: 0.0_f32,
27965        body_yaw_rate: 0.0_f32,
27966        thrust: 0.0_f32,
27967        target_system: 0_u8,
27968        target_component: 0_u8,
27969        type_mask: AttitudeTargetTypemask::DEFAULT,
27970        thrust_body: [0.0_f32; 3usize],
27971    };
27972    #[cfg(feature = "arbitrary")]
27973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27974        use arbitrary::{Arbitrary, Unstructured};
27975        let mut buf = [0u8; 1024];
27976        rng.fill_bytes(&mut buf);
27977        let mut unstructured = Unstructured::new(&buf);
27978        Self::arbitrary(&mut unstructured).unwrap_or_default()
27979    }
27980}
27981impl Default for SET_ATTITUDE_TARGET_DATA {
27982    fn default() -> Self {
27983        Self::DEFAULT.clone()
27984    }
27985}
27986impl MessageData for SET_ATTITUDE_TARGET_DATA {
27987    type Message = MavMessage;
27988    const ID: u32 = 82u32;
27989    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27990    const EXTRA_CRC: u8 = 49u8;
27991    const ENCODED_LEN: usize = 51usize;
27992    fn deser(
27993        _version: MavlinkVersion,
27994        __input: &[u8],
27995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27996        let avail_len = __input.len();
27997        let mut payload_buf = [0; Self::ENCODED_LEN];
27998        let mut buf = if avail_len < Self::ENCODED_LEN {
27999            payload_buf[0..avail_len].copy_from_slice(__input);
28000            Bytes::new(&payload_buf)
28001        } else {
28002            Bytes::new(__input)
28003        };
28004        let mut __struct = Self::default();
28005        __struct.time_boot_ms = buf.get_u32_le();
28006        for v in &mut __struct.q {
28007            let val = buf.get_f32_le();
28008            *v = val;
28009        }
28010        __struct.body_roll_rate = buf.get_f32_le();
28011        __struct.body_pitch_rate = buf.get_f32_le();
28012        __struct.body_yaw_rate = buf.get_f32_le();
28013        __struct.thrust = buf.get_f32_le();
28014        __struct.target_system = buf.get_u8();
28015        __struct.target_component = buf.get_u8();
28016        let tmp = buf.get_u8();
28017        __struct.type_mask =
28018            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28019                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28020                    flag_type: "AttitudeTargetTypemask",
28021                    value: tmp as u64,
28022                })?;
28023        for v in &mut __struct.thrust_body {
28024            let val = buf.get_f32_le();
28025            *v = val;
28026        }
28027        Ok(__struct)
28028    }
28029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28030        let mut __tmp = BytesMut::new(bytes);
28031        #[allow(clippy::absurd_extreme_comparisons)]
28032        #[allow(unused_comparisons)]
28033        if __tmp.remaining() < Self::ENCODED_LEN {
28034            panic!(
28035                "buffer is too small (need {} bytes, but got {})",
28036                Self::ENCODED_LEN,
28037                __tmp.remaining(),
28038            )
28039        }
28040        __tmp.put_u32_le(self.time_boot_ms);
28041        for val in &self.q {
28042            __tmp.put_f32_le(*val);
28043        }
28044        __tmp.put_f32_le(self.body_roll_rate);
28045        __tmp.put_f32_le(self.body_pitch_rate);
28046        __tmp.put_f32_le(self.body_yaw_rate);
28047        __tmp.put_f32_le(self.thrust);
28048        __tmp.put_u8(self.target_system);
28049        __tmp.put_u8(self.target_component);
28050        __tmp.put_u8(self.type_mask.bits() as u8);
28051        if matches!(version, MavlinkVersion::V2) {
28052            for val in &self.thrust_body {
28053                __tmp.put_f32_le(*val);
28054            }
28055            let len = __tmp.len();
28056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28057        } else {
28058            __tmp.len()
28059        }
28060    }
28061}
28062#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28063#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28064#[doc = ""]
28065#[doc = "ID: 48"]
28066#[derive(Debug, Clone, PartialEq)]
28067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28069#[cfg_attr(feature = "ts", derive(TS))]
28070#[cfg_attr(feature = "ts", ts(export))]
28071pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28072    #[doc = "Latitude (WGS84)"]
28073    pub latitude: i32,
28074    #[doc = "Longitude (WGS84)"]
28075    pub longitude: i32,
28076    #[doc = "Altitude (MSL). Positive for up."]
28077    pub altitude: i32,
28078    #[doc = "System ID"]
28079    pub target_system: u8,
28080    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28081    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28082    pub time_usec: u64,
28083}
28084impl SET_GPS_GLOBAL_ORIGIN_DATA {
28085    pub const ENCODED_LEN: usize = 21usize;
28086    pub const DEFAULT: Self = Self {
28087        latitude: 0_i32,
28088        longitude: 0_i32,
28089        altitude: 0_i32,
28090        target_system: 0_u8,
28091        time_usec: 0_u64,
28092    };
28093    #[cfg(feature = "arbitrary")]
28094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28095        use arbitrary::{Arbitrary, Unstructured};
28096        let mut buf = [0u8; 1024];
28097        rng.fill_bytes(&mut buf);
28098        let mut unstructured = Unstructured::new(&buf);
28099        Self::arbitrary(&mut unstructured).unwrap_or_default()
28100    }
28101}
28102impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28103    fn default() -> Self {
28104        Self::DEFAULT.clone()
28105    }
28106}
28107impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28108    type Message = MavMessage;
28109    const ID: u32 = 48u32;
28110    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28111    const EXTRA_CRC: u8 = 41u8;
28112    const ENCODED_LEN: usize = 21usize;
28113    fn deser(
28114        _version: MavlinkVersion,
28115        __input: &[u8],
28116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28117        let avail_len = __input.len();
28118        let mut payload_buf = [0; Self::ENCODED_LEN];
28119        let mut buf = if avail_len < Self::ENCODED_LEN {
28120            payload_buf[0..avail_len].copy_from_slice(__input);
28121            Bytes::new(&payload_buf)
28122        } else {
28123            Bytes::new(__input)
28124        };
28125        let mut __struct = Self::default();
28126        __struct.latitude = buf.get_i32_le();
28127        __struct.longitude = buf.get_i32_le();
28128        __struct.altitude = buf.get_i32_le();
28129        __struct.target_system = buf.get_u8();
28130        __struct.time_usec = buf.get_u64_le();
28131        Ok(__struct)
28132    }
28133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28134        let mut __tmp = BytesMut::new(bytes);
28135        #[allow(clippy::absurd_extreme_comparisons)]
28136        #[allow(unused_comparisons)]
28137        if __tmp.remaining() < Self::ENCODED_LEN {
28138            panic!(
28139                "buffer is too small (need {} bytes, but got {})",
28140                Self::ENCODED_LEN,
28141                __tmp.remaining(),
28142            )
28143        }
28144        __tmp.put_i32_le(self.latitude);
28145        __tmp.put_i32_le(self.longitude);
28146        __tmp.put_i32_le(self.altitude);
28147        __tmp.put_u8(self.target_system);
28148        if matches!(version, MavlinkVersion::V2) {
28149            __tmp.put_u64_le(self.time_usec);
28150            let len = __tmp.len();
28151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28152        } else {
28153            __tmp.len()
28154        }
28155    }
28156}
28157#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28158#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28159#[doc = ""]
28160#[doc = "ID: 243"]
28161#[derive(Debug, Clone, PartialEq)]
28162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28164#[cfg_attr(feature = "ts", derive(TS))]
28165#[cfg_attr(feature = "ts", ts(export))]
28166pub struct SET_HOME_POSITION_DATA {
28167    #[doc = "Latitude (WGS84)"]
28168    pub latitude: i32,
28169    #[doc = "Longitude (WGS84)"]
28170    pub longitude: i32,
28171    #[doc = "Altitude (MSL). Positive for up."]
28172    pub altitude: i32,
28173    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28174    pub x: f32,
28175    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28176    pub y: f32,
28177    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28178    pub z: f32,
28179    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28182    pub q: [f32; 4],
28183    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28184    pub approach_x: f32,
28185    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28186    pub approach_y: f32,
28187    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28188    pub approach_z: f32,
28189    #[doc = "System ID."]
28190    pub target_system: u8,
28191    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28192    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28193    pub time_usec: u64,
28194}
28195impl SET_HOME_POSITION_DATA {
28196    pub const ENCODED_LEN: usize = 61usize;
28197    pub const DEFAULT: Self = Self {
28198        latitude: 0_i32,
28199        longitude: 0_i32,
28200        altitude: 0_i32,
28201        x: 0.0_f32,
28202        y: 0.0_f32,
28203        z: 0.0_f32,
28204        q: [0.0_f32; 4usize],
28205        approach_x: 0.0_f32,
28206        approach_y: 0.0_f32,
28207        approach_z: 0.0_f32,
28208        target_system: 0_u8,
28209        time_usec: 0_u64,
28210    };
28211    #[cfg(feature = "arbitrary")]
28212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28213        use arbitrary::{Arbitrary, Unstructured};
28214        let mut buf = [0u8; 1024];
28215        rng.fill_bytes(&mut buf);
28216        let mut unstructured = Unstructured::new(&buf);
28217        Self::arbitrary(&mut unstructured).unwrap_or_default()
28218    }
28219}
28220impl Default for SET_HOME_POSITION_DATA {
28221    fn default() -> Self {
28222        Self::DEFAULT.clone()
28223    }
28224}
28225impl MessageData for SET_HOME_POSITION_DATA {
28226    type Message = MavMessage;
28227    const ID: u32 = 243u32;
28228    const NAME: &'static str = "SET_HOME_POSITION";
28229    const EXTRA_CRC: u8 = 85u8;
28230    const ENCODED_LEN: usize = 61usize;
28231    fn deser(
28232        _version: MavlinkVersion,
28233        __input: &[u8],
28234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28235        let avail_len = __input.len();
28236        let mut payload_buf = [0; Self::ENCODED_LEN];
28237        let mut buf = if avail_len < Self::ENCODED_LEN {
28238            payload_buf[0..avail_len].copy_from_slice(__input);
28239            Bytes::new(&payload_buf)
28240        } else {
28241            Bytes::new(__input)
28242        };
28243        let mut __struct = Self::default();
28244        __struct.latitude = buf.get_i32_le();
28245        __struct.longitude = buf.get_i32_le();
28246        __struct.altitude = buf.get_i32_le();
28247        __struct.x = buf.get_f32_le();
28248        __struct.y = buf.get_f32_le();
28249        __struct.z = buf.get_f32_le();
28250        for v in &mut __struct.q {
28251            let val = buf.get_f32_le();
28252            *v = val;
28253        }
28254        __struct.approach_x = buf.get_f32_le();
28255        __struct.approach_y = buf.get_f32_le();
28256        __struct.approach_z = buf.get_f32_le();
28257        __struct.target_system = buf.get_u8();
28258        __struct.time_usec = buf.get_u64_le();
28259        Ok(__struct)
28260    }
28261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28262        let mut __tmp = BytesMut::new(bytes);
28263        #[allow(clippy::absurd_extreme_comparisons)]
28264        #[allow(unused_comparisons)]
28265        if __tmp.remaining() < Self::ENCODED_LEN {
28266            panic!(
28267                "buffer is too small (need {} bytes, but got {})",
28268                Self::ENCODED_LEN,
28269                __tmp.remaining(),
28270            )
28271        }
28272        __tmp.put_i32_le(self.latitude);
28273        __tmp.put_i32_le(self.longitude);
28274        __tmp.put_i32_le(self.altitude);
28275        __tmp.put_f32_le(self.x);
28276        __tmp.put_f32_le(self.y);
28277        __tmp.put_f32_le(self.z);
28278        for val in &self.q {
28279            __tmp.put_f32_le(*val);
28280        }
28281        __tmp.put_f32_le(self.approach_x);
28282        __tmp.put_f32_le(self.approach_y);
28283        __tmp.put_f32_le(self.approach_z);
28284        __tmp.put_u8(self.target_system);
28285        if matches!(version, MavlinkVersion::V2) {
28286            __tmp.put_u64_le(self.time_usec);
28287            let len = __tmp.len();
28288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28289        } else {
28290            __tmp.len()
28291        }
28292    }
28293}
28294#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28295#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28296#[doc = ""]
28297#[doc = "ID: 11"]
28298#[derive(Debug, Clone, PartialEq)]
28299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28301#[cfg_attr(feature = "ts", derive(TS))]
28302#[cfg_attr(feature = "ts", ts(export))]
28303pub struct SET_MODE_DATA {
28304    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28305    pub custom_mode: u32,
28306    #[doc = "The system setting the mode"]
28307    pub target_system: u8,
28308    #[doc = "The new base mode."]
28309    pub base_mode: MavMode,
28310}
28311impl SET_MODE_DATA {
28312    pub const ENCODED_LEN: usize = 6usize;
28313    pub const DEFAULT: Self = Self {
28314        custom_mode: 0_u32,
28315        target_system: 0_u8,
28316        base_mode: MavMode::DEFAULT,
28317    };
28318    #[cfg(feature = "arbitrary")]
28319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28320        use arbitrary::{Arbitrary, Unstructured};
28321        let mut buf = [0u8; 1024];
28322        rng.fill_bytes(&mut buf);
28323        let mut unstructured = Unstructured::new(&buf);
28324        Self::arbitrary(&mut unstructured).unwrap_or_default()
28325    }
28326}
28327impl Default for SET_MODE_DATA {
28328    fn default() -> Self {
28329        Self::DEFAULT.clone()
28330    }
28331}
28332impl MessageData for SET_MODE_DATA {
28333    type Message = MavMessage;
28334    const ID: u32 = 11u32;
28335    const NAME: &'static str = "SET_MODE";
28336    const EXTRA_CRC: u8 = 89u8;
28337    const ENCODED_LEN: usize = 6usize;
28338    fn deser(
28339        _version: MavlinkVersion,
28340        __input: &[u8],
28341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28342        let avail_len = __input.len();
28343        let mut payload_buf = [0; Self::ENCODED_LEN];
28344        let mut buf = if avail_len < Self::ENCODED_LEN {
28345            payload_buf[0..avail_len].copy_from_slice(__input);
28346            Bytes::new(&payload_buf)
28347        } else {
28348            Bytes::new(__input)
28349        };
28350        let mut __struct = Self::default();
28351        __struct.custom_mode = buf.get_u32_le();
28352        __struct.target_system = buf.get_u8();
28353        let tmp = buf.get_u8();
28354        __struct.base_mode =
28355            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28356                enum_type: "MavMode",
28357                value: tmp as u64,
28358            })?;
28359        Ok(__struct)
28360    }
28361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28362        let mut __tmp = BytesMut::new(bytes);
28363        #[allow(clippy::absurd_extreme_comparisons)]
28364        #[allow(unused_comparisons)]
28365        if __tmp.remaining() < Self::ENCODED_LEN {
28366            panic!(
28367                "buffer is too small (need {} bytes, but got {})",
28368                Self::ENCODED_LEN,
28369                __tmp.remaining(),
28370            )
28371        }
28372        __tmp.put_u32_le(self.custom_mode);
28373        __tmp.put_u8(self.target_system);
28374        __tmp.put_u8(self.base_mode as u8);
28375        if matches!(version, MavlinkVersion::V2) {
28376            let len = __tmp.len();
28377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28378        } else {
28379            __tmp.len()
28380        }
28381    }
28382}
28383#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28384#[doc = ""]
28385#[doc = "ID: 86"]
28386#[derive(Debug, Clone, PartialEq)]
28387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28389#[cfg_attr(feature = "ts", derive(TS))]
28390#[cfg_attr(feature = "ts", ts(export))]
28391pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28392    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28393    pub time_boot_ms: u32,
28394    #[doc = "Latitude in WGS84 frame"]
28395    pub lat_int: i32,
28396    #[doc = "Longitude in WGS84 frame"]
28397    pub lon_int: i32,
28398    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28399    pub alt: f32,
28400    #[doc = "X velocity in NED frame"]
28401    pub vx: f32,
28402    #[doc = "Y velocity in NED frame"]
28403    pub vy: f32,
28404    #[doc = "Z velocity in NED frame"]
28405    pub vz: f32,
28406    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28407    pub afx: f32,
28408    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28409    pub afy: f32,
28410    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28411    pub afz: f32,
28412    #[doc = "yaw setpoint"]
28413    pub yaw: f32,
28414    #[doc = "yaw rate setpoint"]
28415    pub yaw_rate: f32,
28416    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28417    pub type_mask: PositionTargetTypemask,
28418    #[doc = "System ID"]
28419    pub target_system: u8,
28420    #[doc = "Component ID"]
28421    pub target_component: u8,
28422    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28423    pub coordinate_frame: MavFrame,
28424}
28425impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28426    pub const ENCODED_LEN: usize = 53usize;
28427    pub const DEFAULT: Self = Self {
28428        time_boot_ms: 0_u32,
28429        lat_int: 0_i32,
28430        lon_int: 0_i32,
28431        alt: 0.0_f32,
28432        vx: 0.0_f32,
28433        vy: 0.0_f32,
28434        vz: 0.0_f32,
28435        afx: 0.0_f32,
28436        afy: 0.0_f32,
28437        afz: 0.0_f32,
28438        yaw: 0.0_f32,
28439        yaw_rate: 0.0_f32,
28440        type_mask: PositionTargetTypemask::DEFAULT,
28441        target_system: 0_u8,
28442        target_component: 0_u8,
28443        coordinate_frame: MavFrame::DEFAULT,
28444    };
28445    #[cfg(feature = "arbitrary")]
28446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28447        use arbitrary::{Arbitrary, Unstructured};
28448        let mut buf = [0u8; 1024];
28449        rng.fill_bytes(&mut buf);
28450        let mut unstructured = Unstructured::new(&buf);
28451        Self::arbitrary(&mut unstructured).unwrap_or_default()
28452    }
28453}
28454impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28455    fn default() -> Self {
28456        Self::DEFAULT.clone()
28457    }
28458}
28459impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28460    type Message = MavMessage;
28461    const ID: u32 = 86u32;
28462    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28463    const EXTRA_CRC: u8 = 5u8;
28464    const ENCODED_LEN: usize = 53usize;
28465    fn deser(
28466        _version: MavlinkVersion,
28467        __input: &[u8],
28468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28469        let avail_len = __input.len();
28470        let mut payload_buf = [0; Self::ENCODED_LEN];
28471        let mut buf = if avail_len < Self::ENCODED_LEN {
28472            payload_buf[0..avail_len].copy_from_slice(__input);
28473            Bytes::new(&payload_buf)
28474        } else {
28475            Bytes::new(__input)
28476        };
28477        let mut __struct = Self::default();
28478        __struct.time_boot_ms = buf.get_u32_le();
28479        __struct.lat_int = buf.get_i32_le();
28480        __struct.lon_int = buf.get_i32_le();
28481        __struct.alt = buf.get_f32_le();
28482        __struct.vx = buf.get_f32_le();
28483        __struct.vy = buf.get_f32_le();
28484        __struct.vz = buf.get_f32_le();
28485        __struct.afx = buf.get_f32_le();
28486        __struct.afy = buf.get_f32_le();
28487        __struct.afz = buf.get_f32_le();
28488        __struct.yaw = buf.get_f32_le();
28489        __struct.yaw_rate = buf.get_f32_le();
28490        let tmp = buf.get_u16_le();
28491        __struct.type_mask =
28492            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28493                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28494                    flag_type: "PositionTargetTypemask",
28495                    value: tmp as u64,
28496                })?;
28497        __struct.target_system = buf.get_u8();
28498        __struct.target_component = buf.get_u8();
28499        let tmp = buf.get_u8();
28500        __struct.coordinate_frame =
28501            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28502                enum_type: "MavFrame",
28503                value: tmp as u64,
28504            })?;
28505        Ok(__struct)
28506    }
28507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28508        let mut __tmp = BytesMut::new(bytes);
28509        #[allow(clippy::absurd_extreme_comparisons)]
28510        #[allow(unused_comparisons)]
28511        if __tmp.remaining() < Self::ENCODED_LEN {
28512            panic!(
28513                "buffer is too small (need {} bytes, but got {})",
28514                Self::ENCODED_LEN,
28515                __tmp.remaining(),
28516            )
28517        }
28518        __tmp.put_u32_le(self.time_boot_ms);
28519        __tmp.put_i32_le(self.lat_int);
28520        __tmp.put_i32_le(self.lon_int);
28521        __tmp.put_f32_le(self.alt);
28522        __tmp.put_f32_le(self.vx);
28523        __tmp.put_f32_le(self.vy);
28524        __tmp.put_f32_le(self.vz);
28525        __tmp.put_f32_le(self.afx);
28526        __tmp.put_f32_le(self.afy);
28527        __tmp.put_f32_le(self.afz);
28528        __tmp.put_f32_le(self.yaw);
28529        __tmp.put_f32_le(self.yaw_rate);
28530        __tmp.put_u16_le(self.type_mask.bits() as u16);
28531        __tmp.put_u8(self.target_system);
28532        __tmp.put_u8(self.target_component);
28533        __tmp.put_u8(self.coordinate_frame as u8);
28534        if matches!(version, MavlinkVersion::V2) {
28535            let len = __tmp.len();
28536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28537        } else {
28538            __tmp.len()
28539        }
28540    }
28541}
28542#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28543#[doc = ""]
28544#[doc = "ID: 84"]
28545#[derive(Debug, Clone, PartialEq)]
28546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28548#[cfg_attr(feature = "ts", derive(TS))]
28549#[cfg_attr(feature = "ts", ts(export))]
28550pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28551    #[doc = "Timestamp (time since system boot)."]
28552    pub time_boot_ms: u32,
28553    #[doc = "X Position in NED frame"]
28554    pub x: f32,
28555    #[doc = "Y Position in NED frame"]
28556    pub y: f32,
28557    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28558    pub z: f32,
28559    #[doc = "X velocity in NED frame"]
28560    pub vx: f32,
28561    #[doc = "Y velocity in NED frame"]
28562    pub vy: f32,
28563    #[doc = "Z velocity in NED frame"]
28564    pub vz: f32,
28565    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28566    pub afx: f32,
28567    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28568    pub afy: f32,
28569    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28570    pub afz: f32,
28571    #[doc = "yaw setpoint"]
28572    pub yaw: f32,
28573    #[doc = "yaw rate setpoint"]
28574    pub yaw_rate: f32,
28575    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28576    pub type_mask: PositionTargetTypemask,
28577    #[doc = "System ID"]
28578    pub target_system: u8,
28579    #[doc = "Component ID"]
28580    pub target_component: u8,
28581    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28582    pub coordinate_frame: MavFrame,
28583}
28584impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28585    pub const ENCODED_LEN: usize = 53usize;
28586    pub const DEFAULT: Self = Self {
28587        time_boot_ms: 0_u32,
28588        x: 0.0_f32,
28589        y: 0.0_f32,
28590        z: 0.0_f32,
28591        vx: 0.0_f32,
28592        vy: 0.0_f32,
28593        vz: 0.0_f32,
28594        afx: 0.0_f32,
28595        afy: 0.0_f32,
28596        afz: 0.0_f32,
28597        yaw: 0.0_f32,
28598        yaw_rate: 0.0_f32,
28599        type_mask: PositionTargetTypemask::DEFAULT,
28600        target_system: 0_u8,
28601        target_component: 0_u8,
28602        coordinate_frame: MavFrame::DEFAULT,
28603    };
28604    #[cfg(feature = "arbitrary")]
28605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28606        use arbitrary::{Arbitrary, Unstructured};
28607        let mut buf = [0u8; 1024];
28608        rng.fill_bytes(&mut buf);
28609        let mut unstructured = Unstructured::new(&buf);
28610        Self::arbitrary(&mut unstructured).unwrap_or_default()
28611    }
28612}
28613impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28614    fn default() -> Self {
28615        Self::DEFAULT.clone()
28616    }
28617}
28618impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28619    type Message = MavMessage;
28620    const ID: u32 = 84u32;
28621    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28622    const EXTRA_CRC: u8 = 143u8;
28623    const ENCODED_LEN: usize = 53usize;
28624    fn deser(
28625        _version: MavlinkVersion,
28626        __input: &[u8],
28627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28628        let avail_len = __input.len();
28629        let mut payload_buf = [0; Self::ENCODED_LEN];
28630        let mut buf = if avail_len < Self::ENCODED_LEN {
28631            payload_buf[0..avail_len].copy_from_slice(__input);
28632            Bytes::new(&payload_buf)
28633        } else {
28634            Bytes::new(__input)
28635        };
28636        let mut __struct = Self::default();
28637        __struct.time_boot_ms = buf.get_u32_le();
28638        __struct.x = buf.get_f32_le();
28639        __struct.y = buf.get_f32_le();
28640        __struct.z = buf.get_f32_le();
28641        __struct.vx = buf.get_f32_le();
28642        __struct.vy = buf.get_f32_le();
28643        __struct.vz = buf.get_f32_le();
28644        __struct.afx = buf.get_f32_le();
28645        __struct.afy = buf.get_f32_le();
28646        __struct.afz = buf.get_f32_le();
28647        __struct.yaw = buf.get_f32_le();
28648        __struct.yaw_rate = buf.get_f32_le();
28649        let tmp = buf.get_u16_le();
28650        __struct.type_mask =
28651            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28652                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28653                    flag_type: "PositionTargetTypemask",
28654                    value: tmp as u64,
28655                })?;
28656        __struct.target_system = buf.get_u8();
28657        __struct.target_component = buf.get_u8();
28658        let tmp = buf.get_u8();
28659        __struct.coordinate_frame =
28660            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28661                enum_type: "MavFrame",
28662                value: tmp as u64,
28663            })?;
28664        Ok(__struct)
28665    }
28666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28667        let mut __tmp = BytesMut::new(bytes);
28668        #[allow(clippy::absurd_extreme_comparisons)]
28669        #[allow(unused_comparisons)]
28670        if __tmp.remaining() < Self::ENCODED_LEN {
28671            panic!(
28672                "buffer is too small (need {} bytes, but got {})",
28673                Self::ENCODED_LEN,
28674                __tmp.remaining(),
28675            )
28676        }
28677        __tmp.put_u32_le(self.time_boot_ms);
28678        __tmp.put_f32_le(self.x);
28679        __tmp.put_f32_le(self.y);
28680        __tmp.put_f32_le(self.z);
28681        __tmp.put_f32_le(self.vx);
28682        __tmp.put_f32_le(self.vy);
28683        __tmp.put_f32_le(self.vz);
28684        __tmp.put_f32_le(self.afx);
28685        __tmp.put_f32_le(self.afy);
28686        __tmp.put_f32_le(self.afz);
28687        __tmp.put_f32_le(self.yaw);
28688        __tmp.put_f32_le(self.yaw_rate);
28689        __tmp.put_u16_le(self.type_mask.bits() as u16);
28690        __tmp.put_u8(self.target_system);
28691        __tmp.put_u8(self.target_component);
28692        __tmp.put_u8(self.coordinate_frame as u8);
28693        if matches!(version, MavlinkVersion::V2) {
28694            let len = __tmp.len();
28695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28696        } else {
28697            __tmp.len()
28698        }
28699    }
28700}
28701#[doc = "Status of simulation environment, if used."]
28702#[doc = ""]
28703#[doc = "ID: 108"]
28704#[derive(Debug, Clone, PartialEq)]
28705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28707#[cfg_attr(feature = "ts", derive(TS))]
28708#[cfg_attr(feature = "ts", ts(export))]
28709pub struct SIM_STATE_DATA {
28710    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28711    pub q1: f32,
28712    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28713    pub q2: f32,
28714    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28715    pub q3: f32,
28716    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28717    pub q4: f32,
28718    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28719    pub roll: f32,
28720    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28721    pub pitch: f32,
28722    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28723    pub yaw: f32,
28724    #[doc = "X acceleration"]
28725    pub xacc: f32,
28726    #[doc = "Y acceleration"]
28727    pub yacc: f32,
28728    #[doc = "Z acceleration"]
28729    pub zacc: f32,
28730    #[doc = "Angular speed around X axis"]
28731    pub xgyro: f32,
28732    #[doc = "Angular speed around Y axis"]
28733    pub ygyro: f32,
28734    #[doc = "Angular speed around Z axis"]
28735    pub zgyro: f32,
28736    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28737    pub lat: f32,
28738    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28739    pub lon: f32,
28740    #[doc = "Altitude"]
28741    pub alt: f32,
28742    #[doc = "Horizontal position standard deviation"]
28743    pub std_dev_horz: f32,
28744    #[doc = "Vertical position standard deviation"]
28745    pub std_dev_vert: f32,
28746    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28747    pub vn: f32,
28748    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28749    pub ve: f32,
28750    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28751    pub vd: f32,
28752    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28753    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28754    pub lat_int: i32,
28755    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28757    pub lon_int: i32,
28758}
28759impl SIM_STATE_DATA {
28760    pub const ENCODED_LEN: usize = 92usize;
28761    pub const DEFAULT: Self = Self {
28762        q1: 0.0_f32,
28763        q2: 0.0_f32,
28764        q3: 0.0_f32,
28765        q4: 0.0_f32,
28766        roll: 0.0_f32,
28767        pitch: 0.0_f32,
28768        yaw: 0.0_f32,
28769        xacc: 0.0_f32,
28770        yacc: 0.0_f32,
28771        zacc: 0.0_f32,
28772        xgyro: 0.0_f32,
28773        ygyro: 0.0_f32,
28774        zgyro: 0.0_f32,
28775        lat: 0.0_f32,
28776        lon: 0.0_f32,
28777        alt: 0.0_f32,
28778        std_dev_horz: 0.0_f32,
28779        std_dev_vert: 0.0_f32,
28780        vn: 0.0_f32,
28781        ve: 0.0_f32,
28782        vd: 0.0_f32,
28783        lat_int: 0_i32,
28784        lon_int: 0_i32,
28785    };
28786    #[cfg(feature = "arbitrary")]
28787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28788        use arbitrary::{Arbitrary, Unstructured};
28789        let mut buf = [0u8; 1024];
28790        rng.fill_bytes(&mut buf);
28791        let mut unstructured = Unstructured::new(&buf);
28792        Self::arbitrary(&mut unstructured).unwrap_or_default()
28793    }
28794}
28795impl Default for SIM_STATE_DATA {
28796    fn default() -> Self {
28797        Self::DEFAULT.clone()
28798    }
28799}
28800impl MessageData for SIM_STATE_DATA {
28801    type Message = MavMessage;
28802    const ID: u32 = 108u32;
28803    const NAME: &'static str = "SIM_STATE";
28804    const EXTRA_CRC: u8 = 32u8;
28805    const ENCODED_LEN: usize = 92usize;
28806    fn deser(
28807        _version: MavlinkVersion,
28808        __input: &[u8],
28809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28810        let avail_len = __input.len();
28811        let mut payload_buf = [0; Self::ENCODED_LEN];
28812        let mut buf = if avail_len < Self::ENCODED_LEN {
28813            payload_buf[0..avail_len].copy_from_slice(__input);
28814            Bytes::new(&payload_buf)
28815        } else {
28816            Bytes::new(__input)
28817        };
28818        let mut __struct = Self::default();
28819        __struct.q1 = buf.get_f32_le();
28820        __struct.q2 = buf.get_f32_le();
28821        __struct.q3 = buf.get_f32_le();
28822        __struct.q4 = buf.get_f32_le();
28823        __struct.roll = buf.get_f32_le();
28824        __struct.pitch = buf.get_f32_le();
28825        __struct.yaw = buf.get_f32_le();
28826        __struct.xacc = buf.get_f32_le();
28827        __struct.yacc = buf.get_f32_le();
28828        __struct.zacc = buf.get_f32_le();
28829        __struct.xgyro = buf.get_f32_le();
28830        __struct.ygyro = buf.get_f32_le();
28831        __struct.zgyro = buf.get_f32_le();
28832        __struct.lat = buf.get_f32_le();
28833        __struct.lon = buf.get_f32_le();
28834        __struct.alt = buf.get_f32_le();
28835        __struct.std_dev_horz = buf.get_f32_le();
28836        __struct.std_dev_vert = buf.get_f32_le();
28837        __struct.vn = buf.get_f32_le();
28838        __struct.ve = buf.get_f32_le();
28839        __struct.vd = buf.get_f32_le();
28840        __struct.lat_int = buf.get_i32_le();
28841        __struct.lon_int = buf.get_i32_le();
28842        Ok(__struct)
28843    }
28844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28845        let mut __tmp = BytesMut::new(bytes);
28846        #[allow(clippy::absurd_extreme_comparisons)]
28847        #[allow(unused_comparisons)]
28848        if __tmp.remaining() < Self::ENCODED_LEN {
28849            panic!(
28850                "buffer is too small (need {} bytes, but got {})",
28851                Self::ENCODED_LEN,
28852                __tmp.remaining(),
28853            )
28854        }
28855        __tmp.put_f32_le(self.q1);
28856        __tmp.put_f32_le(self.q2);
28857        __tmp.put_f32_le(self.q3);
28858        __tmp.put_f32_le(self.q4);
28859        __tmp.put_f32_le(self.roll);
28860        __tmp.put_f32_le(self.pitch);
28861        __tmp.put_f32_le(self.yaw);
28862        __tmp.put_f32_le(self.xacc);
28863        __tmp.put_f32_le(self.yacc);
28864        __tmp.put_f32_le(self.zacc);
28865        __tmp.put_f32_le(self.xgyro);
28866        __tmp.put_f32_le(self.ygyro);
28867        __tmp.put_f32_le(self.zgyro);
28868        __tmp.put_f32_le(self.lat);
28869        __tmp.put_f32_le(self.lon);
28870        __tmp.put_f32_le(self.alt);
28871        __tmp.put_f32_le(self.std_dev_horz);
28872        __tmp.put_f32_le(self.std_dev_vert);
28873        __tmp.put_f32_le(self.vn);
28874        __tmp.put_f32_le(self.ve);
28875        __tmp.put_f32_le(self.vd);
28876        if matches!(version, MavlinkVersion::V2) {
28877            __tmp.put_i32_le(self.lat_int);
28878            __tmp.put_i32_le(self.lon_int);
28879            let len = __tmp.len();
28880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28881        } else {
28882            __tmp.len()
28883        }
28884    }
28885}
28886#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28887#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28888#[doc = ""]
28889#[doc = "ID: 370"]
28890#[derive(Debug, Clone, PartialEq)]
28891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28893#[cfg_attr(feature = "ts", derive(TS))]
28894#[cfg_attr(feature = "ts", ts(export))]
28895pub struct SMART_BATTERY_INFO_DATA {
28896    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28897    pub capacity_full_specification: i32,
28898    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28899    pub capacity_full: i32,
28900    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28901    pub cycle_count: u16,
28902    #[doc = "Battery weight. 0: field not provided."]
28903    pub weight: u16,
28904    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28905    pub discharge_minimum_voltage: u16,
28906    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28907    pub charging_minimum_voltage: u16,
28908    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28909    pub resting_minimum_voltage: u16,
28910    #[doc = "Battery ID"]
28911    pub id: u8,
28912    #[doc = "Function of the battery"]
28913    pub battery_function: MavBatteryFunction,
28914    #[doc = "Type (chemistry) of the battery"]
28915    pub mavtype: MavBatteryType,
28916    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28917    #[cfg_attr(feature = "ts", ts(type = "string"))]
28918    pub serial_number: CharArray<16>,
28919    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28920    #[cfg_attr(feature = "ts", ts(type = "string"))]
28921    pub device_name: CharArray<50>,
28922    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28923    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28924    pub charging_maximum_voltage: u16,
28925    #[doc = "Number of battery cells in series. 0: field not provided."]
28926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28927    pub cells_in_series: u8,
28928    #[doc = "Maximum pack discharge current. 0: field not provided."]
28929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28930    pub discharge_maximum_current: u32,
28931    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28933    pub discharge_maximum_burst_current: u32,
28934    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28936    #[cfg_attr(feature = "ts", ts(type = "string"))]
28937    pub manufacture_date: CharArray<11>,
28938}
28939impl SMART_BATTERY_INFO_DATA {
28940    pub const ENCODED_LEN: usize = 109usize;
28941    pub const DEFAULT: Self = Self {
28942        capacity_full_specification: 0_i32,
28943        capacity_full: 0_i32,
28944        cycle_count: 0_u16,
28945        weight: 0_u16,
28946        discharge_minimum_voltage: 0_u16,
28947        charging_minimum_voltage: 0_u16,
28948        resting_minimum_voltage: 0_u16,
28949        id: 0_u8,
28950        battery_function: MavBatteryFunction::DEFAULT,
28951        mavtype: MavBatteryType::DEFAULT,
28952        serial_number: CharArray::new([0_u8; 16usize]),
28953        device_name: CharArray::new([0_u8; 50usize]),
28954        charging_maximum_voltage: 0_u16,
28955        cells_in_series: 0_u8,
28956        discharge_maximum_current: 0_u32,
28957        discharge_maximum_burst_current: 0_u32,
28958        manufacture_date: CharArray::new([0_u8; 11usize]),
28959    };
28960    #[cfg(feature = "arbitrary")]
28961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28962        use arbitrary::{Arbitrary, Unstructured};
28963        let mut buf = [0u8; 1024];
28964        rng.fill_bytes(&mut buf);
28965        let mut unstructured = Unstructured::new(&buf);
28966        Self::arbitrary(&mut unstructured).unwrap_or_default()
28967    }
28968}
28969impl Default for SMART_BATTERY_INFO_DATA {
28970    fn default() -> Self {
28971        Self::DEFAULT.clone()
28972    }
28973}
28974impl MessageData for SMART_BATTERY_INFO_DATA {
28975    type Message = MavMessage;
28976    const ID: u32 = 370u32;
28977    const NAME: &'static str = "SMART_BATTERY_INFO";
28978    const EXTRA_CRC: u8 = 75u8;
28979    const ENCODED_LEN: usize = 109usize;
28980    fn deser(
28981        _version: MavlinkVersion,
28982        __input: &[u8],
28983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28984        let avail_len = __input.len();
28985        let mut payload_buf = [0; Self::ENCODED_LEN];
28986        let mut buf = if avail_len < Self::ENCODED_LEN {
28987            payload_buf[0..avail_len].copy_from_slice(__input);
28988            Bytes::new(&payload_buf)
28989        } else {
28990            Bytes::new(__input)
28991        };
28992        let mut __struct = Self::default();
28993        __struct.capacity_full_specification = buf.get_i32_le();
28994        __struct.capacity_full = buf.get_i32_le();
28995        __struct.cycle_count = buf.get_u16_le();
28996        __struct.weight = buf.get_u16_le();
28997        __struct.discharge_minimum_voltage = buf.get_u16_le();
28998        __struct.charging_minimum_voltage = buf.get_u16_le();
28999        __struct.resting_minimum_voltage = buf.get_u16_le();
29000        __struct.id = buf.get_u8();
29001        let tmp = buf.get_u8();
29002        __struct.battery_function =
29003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29004                enum_type: "MavBatteryFunction",
29005                value: tmp as u64,
29006            })?;
29007        let tmp = buf.get_u8();
29008        __struct.mavtype =
29009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29010                enum_type: "MavBatteryType",
29011                value: tmp as u64,
29012            })?;
29013        let mut tmp = [0_u8; 16usize];
29014        for v in &mut tmp {
29015            *v = buf.get_u8();
29016        }
29017        __struct.serial_number = CharArray::new(tmp);
29018        let mut tmp = [0_u8; 50usize];
29019        for v in &mut tmp {
29020            *v = buf.get_u8();
29021        }
29022        __struct.device_name = CharArray::new(tmp);
29023        __struct.charging_maximum_voltage = buf.get_u16_le();
29024        __struct.cells_in_series = buf.get_u8();
29025        __struct.discharge_maximum_current = buf.get_u32_le();
29026        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29027        let mut tmp = [0_u8; 11usize];
29028        for v in &mut tmp {
29029            *v = buf.get_u8();
29030        }
29031        __struct.manufacture_date = CharArray::new(tmp);
29032        Ok(__struct)
29033    }
29034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29035        let mut __tmp = BytesMut::new(bytes);
29036        #[allow(clippy::absurd_extreme_comparisons)]
29037        #[allow(unused_comparisons)]
29038        if __tmp.remaining() < Self::ENCODED_LEN {
29039            panic!(
29040                "buffer is too small (need {} bytes, but got {})",
29041                Self::ENCODED_LEN,
29042                __tmp.remaining(),
29043            )
29044        }
29045        __tmp.put_i32_le(self.capacity_full_specification);
29046        __tmp.put_i32_le(self.capacity_full);
29047        __tmp.put_u16_le(self.cycle_count);
29048        __tmp.put_u16_le(self.weight);
29049        __tmp.put_u16_le(self.discharge_minimum_voltage);
29050        __tmp.put_u16_le(self.charging_minimum_voltage);
29051        __tmp.put_u16_le(self.resting_minimum_voltage);
29052        __tmp.put_u8(self.id);
29053        __tmp.put_u8(self.battery_function as u8);
29054        __tmp.put_u8(self.mavtype as u8);
29055        for val in &self.serial_number {
29056            __tmp.put_u8(*val);
29057        }
29058        for val in &self.device_name {
29059            __tmp.put_u8(*val);
29060        }
29061        if matches!(version, MavlinkVersion::V2) {
29062            __tmp.put_u16_le(self.charging_maximum_voltage);
29063            __tmp.put_u8(self.cells_in_series);
29064            __tmp.put_u32_le(self.discharge_maximum_current);
29065            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29066            for val in &self.manufacture_date {
29067                __tmp.put_u8(*val);
29068            }
29069            let len = __tmp.len();
29070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29071        } else {
29072            __tmp.len()
29073        }
29074    }
29075}
29076#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29077#[doc = ""]
29078#[doc = "ID: 253"]
29079#[derive(Debug, Clone, PartialEq)]
29080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29082#[cfg_attr(feature = "ts", derive(TS))]
29083#[cfg_attr(feature = "ts", ts(export))]
29084pub struct STATUSTEXT_DATA {
29085    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29086    pub severity: MavSeverity,
29087    #[doc = "Status text message, without null termination character"]
29088    #[cfg_attr(feature = "ts", ts(type = "string"))]
29089    pub text: CharArray<50>,
29090    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29091    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29092    pub id: u16,
29093    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29094    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29095    pub chunk_seq: u8,
29096}
29097impl STATUSTEXT_DATA {
29098    pub const ENCODED_LEN: usize = 54usize;
29099    pub const DEFAULT: Self = Self {
29100        severity: MavSeverity::DEFAULT,
29101        text: CharArray::new([0_u8; 50usize]),
29102        id: 0_u16,
29103        chunk_seq: 0_u8,
29104    };
29105    #[cfg(feature = "arbitrary")]
29106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29107        use arbitrary::{Arbitrary, Unstructured};
29108        let mut buf = [0u8; 1024];
29109        rng.fill_bytes(&mut buf);
29110        let mut unstructured = Unstructured::new(&buf);
29111        Self::arbitrary(&mut unstructured).unwrap_or_default()
29112    }
29113}
29114impl Default for STATUSTEXT_DATA {
29115    fn default() -> Self {
29116        Self::DEFAULT.clone()
29117    }
29118}
29119impl MessageData for STATUSTEXT_DATA {
29120    type Message = MavMessage;
29121    const ID: u32 = 253u32;
29122    const NAME: &'static str = "STATUSTEXT";
29123    const EXTRA_CRC: u8 = 83u8;
29124    const ENCODED_LEN: usize = 54usize;
29125    fn deser(
29126        _version: MavlinkVersion,
29127        __input: &[u8],
29128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29129        let avail_len = __input.len();
29130        let mut payload_buf = [0; Self::ENCODED_LEN];
29131        let mut buf = if avail_len < Self::ENCODED_LEN {
29132            payload_buf[0..avail_len].copy_from_slice(__input);
29133            Bytes::new(&payload_buf)
29134        } else {
29135            Bytes::new(__input)
29136        };
29137        let mut __struct = Self::default();
29138        let tmp = buf.get_u8();
29139        __struct.severity =
29140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29141                enum_type: "MavSeverity",
29142                value: tmp as u64,
29143            })?;
29144        let mut tmp = [0_u8; 50usize];
29145        for v in &mut tmp {
29146            *v = buf.get_u8();
29147        }
29148        __struct.text = CharArray::new(tmp);
29149        __struct.id = buf.get_u16_le();
29150        __struct.chunk_seq = buf.get_u8();
29151        Ok(__struct)
29152    }
29153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29154        let mut __tmp = BytesMut::new(bytes);
29155        #[allow(clippy::absurd_extreme_comparisons)]
29156        #[allow(unused_comparisons)]
29157        if __tmp.remaining() < Self::ENCODED_LEN {
29158            panic!(
29159                "buffer is too small (need {} bytes, but got {})",
29160                Self::ENCODED_LEN,
29161                __tmp.remaining(),
29162            )
29163        }
29164        __tmp.put_u8(self.severity as u8);
29165        for val in &self.text {
29166            __tmp.put_u8(*val);
29167        }
29168        if matches!(version, MavlinkVersion::V2) {
29169            __tmp.put_u16_le(self.id);
29170            __tmp.put_u8(self.chunk_seq);
29171            let len = __tmp.len();
29172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29173        } else {
29174            __tmp.len()
29175        }
29176    }
29177}
29178#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29179#[doc = ""]
29180#[doc = "ID: 261"]
29181#[derive(Debug, Clone, PartialEq)]
29182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29184#[cfg_attr(feature = "ts", derive(TS))]
29185#[cfg_attr(feature = "ts", ts(export))]
29186pub struct STORAGE_INFORMATION_DATA {
29187    #[doc = "Timestamp (time since system boot)."]
29188    pub time_boot_ms: u32,
29189    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29190    pub total_capacity: f32,
29191    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29192    pub used_capacity: f32,
29193    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29194    pub available_capacity: f32,
29195    #[doc = "Read speed."]
29196    pub read_speed: f32,
29197    #[doc = "Write speed."]
29198    pub write_speed: f32,
29199    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29200    pub storage_id: u8,
29201    #[doc = "Number of storage devices"]
29202    pub storage_count: u8,
29203    #[doc = "Status of storage"]
29204    pub status: StorageStatus,
29205    #[doc = "Type of storage"]
29206    #[cfg_attr(feature = "serde", serde(default))]
29207    pub mavtype: StorageType,
29208    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29210    #[cfg_attr(feature = "ts", ts(type = "string"))]
29211    pub name: CharArray<32>,
29212    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29213    #[cfg_attr(feature = "serde", serde(default))]
29214    pub storage_usage: StorageUsageFlag,
29215}
29216impl STORAGE_INFORMATION_DATA {
29217    pub const ENCODED_LEN: usize = 61usize;
29218    pub const DEFAULT: Self = Self {
29219        time_boot_ms: 0_u32,
29220        total_capacity: 0.0_f32,
29221        used_capacity: 0.0_f32,
29222        available_capacity: 0.0_f32,
29223        read_speed: 0.0_f32,
29224        write_speed: 0.0_f32,
29225        storage_id: 0_u8,
29226        storage_count: 0_u8,
29227        status: StorageStatus::DEFAULT,
29228        mavtype: StorageType::DEFAULT,
29229        name: CharArray::new([0_u8; 32usize]),
29230        storage_usage: StorageUsageFlag::DEFAULT,
29231    };
29232    #[cfg(feature = "arbitrary")]
29233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29234        use arbitrary::{Arbitrary, Unstructured};
29235        let mut buf = [0u8; 1024];
29236        rng.fill_bytes(&mut buf);
29237        let mut unstructured = Unstructured::new(&buf);
29238        Self::arbitrary(&mut unstructured).unwrap_or_default()
29239    }
29240}
29241impl Default for STORAGE_INFORMATION_DATA {
29242    fn default() -> Self {
29243        Self::DEFAULT.clone()
29244    }
29245}
29246impl MessageData for STORAGE_INFORMATION_DATA {
29247    type Message = MavMessage;
29248    const ID: u32 = 261u32;
29249    const NAME: &'static str = "STORAGE_INFORMATION";
29250    const EXTRA_CRC: u8 = 179u8;
29251    const ENCODED_LEN: usize = 61usize;
29252    fn deser(
29253        _version: MavlinkVersion,
29254        __input: &[u8],
29255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29256        let avail_len = __input.len();
29257        let mut payload_buf = [0; Self::ENCODED_LEN];
29258        let mut buf = if avail_len < Self::ENCODED_LEN {
29259            payload_buf[0..avail_len].copy_from_slice(__input);
29260            Bytes::new(&payload_buf)
29261        } else {
29262            Bytes::new(__input)
29263        };
29264        let mut __struct = Self::default();
29265        __struct.time_boot_ms = buf.get_u32_le();
29266        __struct.total_capacity = buf.get_f32_le();
29267        __struct.used_capacity = buf.get_f32_le();
29268        __struct.available_capacity = buf.get_f32_le();
29269        __struct.read_speed = buf.get_f32_le();
29270        __struct.write_speed = buf.get_f32_le();
29271        __struct.storage_id = buf.get_u8();
29272        __struct.storage_count = buf.get_u8();
29273        let tmp = buf.get_u8();
29274        __struct.status =
29275            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29276                enum_type: "StorageStatus",
29277                value: tmp as u64,
29278            })?;
29279        let tmp = buf.get_u8();
29280        __struct.mavtype =
29281            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29282                enum_type: "StorageType",
29283                value: tmp as u64,
29284            })?;
29285        let mut tmp = [0_u8; 32usize];
29286        for v in &mut tmp {
29287            *v = buf.get_u8();
29288        }
29289        __struct.name = CharArray::new(tmp);
29290        let tmp = buf.get_u8();
29291        __struct.storage_usage = StorageUsageFlag::from_bits(
29292            tmp as <StorageUsageFlag as Flags>::Bits,
29293        )
29294        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29295            flag_type: "StorageUsageFlag",
29296            value: tmp as u64,
29297        })?;
29298        Ok(__struct)
29299    }
29300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29301        let mut __tmp = BytesMut::new(bytes);
29302        #[allow(clippy::absurd_extreme_comparisons)]
29303        #[allow(unused_comparisons)]
29304        if __tmp.remaining() < Self::ENCODED_LEN {
29305            panic!(
29306                "buffer is too small (need {} bytes, but got {})",
29307                Self::ENCODED_LEN,
29308                __tmp.remaining(),
29309            )
29310        }
29311        __tmp.put_u32_le(self.time_boot_ms);
29312        __tmp.put_f32_le(self.total_capacity);
29313        __tmp.put_f32_le(self.used_capacity);
29314        __tmp.put_f32_le(self.available_capacity);
29315        __tmp.put_f32_le(self.read_speed);
29316        __tmp.put_f32_le(self.write_speed);
29317        __tmp.put_u8(self.storage_id);
29318        __tmp.put_u8(self.storage_count);
29319        __tmp.put_u8(self.status as u8);
29320        if matches!(version, MavlinkVersion::V2) {
29321            __tmp.put_u8(self.mavtype as u8);
29322            for val in &self.name {
29323                __tmp.put_u8(*val);
29324            }
29325            __tmp.put_u8(self.storage_usage.bits() as u8);
29326            let len = __tmp.len();
29327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29328        } else {
29329            __tmp.len()
29330        }
29331    }
29332}
29333#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29334#[doc = ""]
29335#[doc = "ID: 401"]
29336#[derive(Debug, Clone, PartialEq)]
29337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29339#[cfg_attr(feature = "ts", derive(TS))]
29340#[cfg_attr(feature = "ts", ts(export))]
29341pub struct SUPPORTED_TUNES_DATA {
29342    #[doc = "Bitfield of supported tune formats."]
29343    pub format: TuneFormat,
29344    #[doc = "System ID"]
29345    pub target_system: u8,
29346    #[doc = "Component ID"]
29347    pub target_component: u8,
29348}
29349impl SUPPORTED_TUNES_DATA {
29350    pub const ENCODED_LEN: usize = 6usize;
29351    pub const DEFAULT: Self = Self {
29352        format: TuneFormat::DEFAULT,
29353        target_system: 0_u8,
29354        target_component: 0_u8,
29355    };
29356    #[cfg(feature = "arbitrary")]
29357    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29358        use arbitrary::{Arbitrary, Unstructured};
29359        let mut buf = [0u8; 1024];
29360        rng.fill_bytes(&mut buf);
29361        let mut unstructured = Unstructured::new(&buf);
29362        Self::arbitrary(&mut unstructured).unwrap_or_default()
29363    }
29364}
29365impl Default for SUPPORTED_TUNES_DATA {
29366    fn default() -> Self {
29367        Self::DEFAULT.clone()
29368    }
29369}
29370impl MessageData for SUPPORTED_TUNES_DATA {
29371    type Message = MavMessage;
29372    const ID: u32 = 401u32;
29373    const NAME: &'static str = "SUPPORTED_TUNES";
29374    const EXTRA_CRC: u8 = 183u8;
29375    const ENCODED_LEN: usize = 6usize;
29376    fn deser(
29377        _version: MavlinkVersion,
29378        __input: &[u8],
29379    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29380        let avail_len = __input.len();
29381        let mut payload_buf = [0; Self::ENCODED_LEN];
29382        let mut buf = if avail_len < Self::ENCODED_LEN {
29383            payload_buf[0..avail_len].copy_from_slice(__input);
29384            Bytes::new(&payload_buf)
29385        } else {
29386            Bytes::new(__input)
29387        };
29388        let mut __struct = Self::default();
29389        let tmp = buf.get_u32_le();
29390        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29391            ::mavlink_core::error::ParserError::InvalidEnum {
29392                enum_type: "TuneFormat",
29393                value: tmp as u64,
29394            },
29395        )?;
29396        __struct.target_system = buf.get_u8();
29397        __struct.target_component = buf.get_u8();
29398        Ok(__struct)
29399    }
29400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29401        let mut __tmp = BytesMut::new(bytes);
29402        #[allow(clippy::absurd_extreme_comparisons)]
29403        #[allow(unused_comparisons)]
29404        if __tmp.remaining() < Self::ENCODED_LEN {
29405            panic!(
29406                "buffer is too small (need {} bytes, but got {})",
29407                Self::ENCODED_LEN,
29408                __tmp.remaining(),
29409            )
29410        }
29411        __tmp.put_u32_le(self.format as u32);
29412        __tmp.put_u8(self.target_system);
29413        __tmp.put_u8(self.target_component);
29414        if matches!(version, MavlinkVersion::V2) {
29415            let len = __tmp.len();
29416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29417        } else {
29418            __tmp.len()
29419        }
29420    }
29421}
29422#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29423#[doc = ""]
29424#[doc = "ID: 2"]
29425#[derive(Debug, Clone, PartialEq)]
29426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29428#[cfg_attr(feature = "ts", derive(TS))]
29429#[cfg_attr(feature = "ts", ts(export))]
29430pub struct SYSTEM_TIME_DATA {
29431    #[doc = "Timestamp (UNIX epoch time)."]
29432    pub time_unix_usec: u64,
29433    #[doc = "Timestamp (time since system boot)."]
29434    pub time_boot_ms: u32,
29435}
29436impl SYSTEM_TIME_DATA {
29437    pub const ENCODED_LEN: usize = 12usize;
29438    pub const DEFAULT: Self = Self {
29439        time_unix_usec: 0_u64,
29440        time_boot_ms: 0_u32,
29441    };
29442    #[cfg(feature = "arbitrary")]
29443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29444        use arbitrary::{Arbitrary, Unstructured};
29445        let mut buf = [0u8; 1024];
29446        rng.fill_bytes(&mut buf);
29447        let mut unstructured = Unstructured::new(&buf);
29448        Self::arbitrary(&mut unstructured).unwrap_or_default()
29449    }
29450}
29451impl Default for SYSTEM_TIME_DATA {
29452    fn default() -> Self {
29453        Self::DEFAULT.clone()
29454    }
29455}
29456impl MessageData for SYSTEM_TIME_DATA {
29457    type Message = MavMessage;
29458    const ID: u32 = 2u32;
29459    const NAME: &'static str = "SYSTEM_TIME";
29460    const EXTRA_CRC: u8 = 137u8;
29461    const ENCODED_LEN: usize = 12usize;
29462    fn deser(
29463        _version: MavlinkVersion,
29464        __input: &[u8],
29465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29466        let avail_len = __input.len();
29467        let mut payload_buf = [0; Self::ENCODED_LEN];
29468        let mut buf = if avail_len < Self::ENCODED_LEN {
29469            payload_buf[0..avail_len].copy_from_slice(__input);
29470            Bytes::new(&payload_buf)
29471        } else {
29472            Bytes::new(__input)
29473        };
29474        let mut __struct = Self::default();
29475        __struct.time_unix_usec = buf.get_u64_le();
29476        __struct.time_boot_ms = buf.get_u32_le();
29477        Ok(__struct)
29478    }
29479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29480        let mut __tmp = BytesMut::new(bytes);
29481        #[allow(clippy::absurd_extreme_comparisons)]
29482        #[allow(unused_comparisons)]
29483        if __tmp.remaining() < Self::ENCODED_LEN {
29484            panic!(
29485                "buffer is too small (need {} bytes, but got {})",
29486                Self::ENCODED_LEN,
29487                __tmp.remaining(),
29488            )
29489        }
29490        __tmp.put_u64_le(self.time_unix_usec);
29491        __tmp.put_u32_le(self.time_boot_ms);
29492        if matches!(version, MavlinkVersion::V2) {
29493            let len = __tmp.len();
29494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29495        } else {
29496            __tmp.len()
29497        }
29498    }
29499}
29500#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29501#[doc = ""]
29502#[doc = "ID: 1"]
29503#[derive(Debug, Clone, PartialEq)]
29504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29506#[cfg_attr(feature = "ts", derive(TS))]
29507#[cfg_attr(feature = "ts", ts(export))]
29508pub struct SYS_STATUS_DATA {
29509    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29510    pub onboard_control_sensors_present: MavSysStatusSensor,
29511    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29512    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29513    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29514    pub onboard_control_sensors_health: MavSysStatusSensor,
29515    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29516    pub load: u16,
29517    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29518    pub voltage_battery: u16,
29519    #[doc = "Battery current, -1: Current not sent by autopilot"]
29520    pub current_battery: i16,
29521    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29522    pub drop_rate_comm: u16,
29523    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29524    pub errors_comm: u16,
29525    #[doc = "Autopilot-specific errors"]
29526    pub errors_count1: u16,
29527    #[doc = "Autopilot-specific errors"]
29528    pub errors_count2: u16,
29529    #[doc = "Autopilot-specific errors"]
29530    pub errors_count3: u16,
29531    #[doc = "Autopilot-specific errors"]
29532    pub errors_count4: u16,
29533    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29534    pub battery_remaining: i8,
29535    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29536    #[cfg_attr(feature = "serde", serde(default))]
29537    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29538    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29539    #[cfg_attr(feature = "serde", serde(default))]
29540    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29541    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29542    #[cfg_attr(feature = "serde", serde(default))]
29543    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29544}
29545impl SYS_STATUS_DATA {
29546    pub const ENCODED_LEN: usize = 43usize;
29547    pub const DEFAULT: Self = Self {
29548        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29549        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29550        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29551        load: 0_u16,
29552        voltage_battery: 0_u16,
29553        current_battery: 0_i16,
29554        drop_rate_comm: 0_u16,
29555        errors_comm: 0_u16,
29556        errors_count1: 0_u16,
29557        errors_count2: 0_u16,
29558        errors_count3: 0_u16,
29559        errors_count4: 0_u16,
29560        battery_remaining: 0_i8,
29561        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29562        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29563        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29564    };
29565    #[cfg(feature = "arbitrary")]
29566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29567        use arbitrary::{Arbitrary, Unstructured};
29568        let mut buf = [0u8; 1024];
29569        rng.fill_bytes(&mut buf);
29570        let mut unstructured = Unstructured::new(&buf);
29571        Self::arbitrary(&mut unstructured).unwrap_or_default()
29572    }
29573}
29574impl Default for SYS_STATUS_DATA {
29575    fn default() -> Self {
29576        Self::DEFAULT.clone()
29577    }
29578}
29579impl MessageData for SYS_STATUS_DATA {
29580    type Message = MavMessage;
29581    const ID: u32 = 1u32;
29582    const NAME: &'static str = "SYS_STATUS";
29583    const EXTRA_CRC: u8 = 124u8;
29584    const ENCODED_LEN: usize = 43usize;
29585    fn deser(
29586        _version: MavlinkVersion,
29587        __input: &[u8],
29588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29589        let avail_len = __input.len();
29590        let mut payload_buf = [0; Self::ENCODED_LEN];
29591        let mut buf = if avail_len < Self::ENCODED_LEN {
29592            payload_buf[0..avail_len].copy_from_slice(__input);
29593            Bytes::new(&payload_buf)
29594        } else {
29595            Bytes::new(__input)
29596        };
29597        let mut __struct = Self::default();
29598        let tmp = buf.get_u32_le();
29599        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29600            tmp as <MavSysStatusSensor as Flags>::Bits,
29601        )
29602        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29603            flag_type: "MavSysStatusSensor",
29604            value: tmp as u64,
29605        })?;
29606        let tmp = buf.get_u32_le();
29607        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29608            tmp as <MavSysStatusSensor as Flags>::Bits,
29609        )
29610        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29611            flag_type: "MavSysStatusSensor",
29612            value: tmp as u64,
29613        })?;
29614        let tmp = buf.get_u32_le();
29615        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29616            tmp as <MavSysStatusSensor as Flags>::Bits,
29617        )
29618        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29619            flag_type: "MavSysStatusSensor",
29620            value: tmp as u64,
29621        })?;
29622        __struct.load = buf.get_u16_le();
29623        __struct.voltage_battery = buf.get_u16_le();
29624        __struct.current_battery = buf.get_i16_le();
29625        __struct.drop_rate_comm = buf.get_u16_le();
29626        __struct.errors_comm = buf.get_u16_le();
29627        __struct.errors_count1 = buf.get_u16_le();
29628        __struct.errors_count2 = buf.get_u16_le();
29629        __struct.errors_count3 = buf.get_u16_le();
29630        __struct.errors_count4 = buf.get_u16_le();
29631        __struct.battery_remaining = buf.get_i8();
29632        let tmp = buf.get_u32_le();
29633        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29634            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29635        )
29636        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29637            flag_type: "MavSysStatusSensorExtended",
29638            value: tmp as u64,
29639        })?;
29640        let tmp = buf.get_u32_le();
29641        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29642            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29643        )
29644        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29645            flag_type: "MavSysStatusSensorExtended",
29646            value: tmp as u64,
29647        })?;
29648        let tmp = buf.get_u32_le();
29649        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29650            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29651        )
29652        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29653            flag_type: "MavSysStatusSensorExtended",
29654            value: tmp as u64,
29655        })?;
29656        Ok(__struct)
29657    }
29658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29659        let mut __tmp = BytesMut::new(bytes);
29660        #[allow(clippy::absurd_extreme_comparisons)]
29661        #[allow(unused_comparisons)]
29662        if __tmp.remaining() < Self::ENCODED_LEN {
29663            panic!(
29664                "buffer is too small (need {} bytes, but got {})",
29665                Self::ENCODED_LEN,
29666                __tmp.remaining(),
29667            )
29668        }
29669        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29670        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29671        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29672        __tmp.put_u16_le(self.load);
29673        __tmp.put_u16_le(self.voltage_battery);
29674        __tmp.put_i16_le(self.current_battery);
29675        __tmp.put_u16_le(self.drop_rate_comm);
29676        __tmp.put_u16_le(self.errors_comm);
29677        __tmp.put_u16_le(self.errors_count1);
29678        __tmp.put_u16_le(self.errors_count2);
29679        __tmp.put_u16_le(self.errors_count3);
29680        __tmp.put_u16_le(self.errors_count4);
29681        __tmp.put_i8(self.battery_remaining);
29682        if matches!(version, MavlinkVersion::V2) {
29683            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29684            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29685            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29686            let len = __tmp.len();
29687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29688        } else {
29689            __tmp.len()
29690        }
29691    }
29692}
29693#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29694#[doc = ""]
29695#[doc = "ID: 135"]
29696#[derive(Debug, Clone, PartialEq)]
29697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29699#[cfg_attr(feature = "ts", derive(TS))]
29700#[cfg_attr(feature = "ts", ts(export))]
29701pub struct TERRAIN_CHECK_DATA {
29702    #[doc = "Latitude"]
29703    pub lat: i32,
29704    #[doc = "Longitude"]
29705    pub lon: i32,
29706}
29707impl TERRAIN_CHECK_DATA {
29708    pub const ENCODED_LEN: usize = 8usize;
29709    pub const DEFAULT: Self = Self {
29710        lat: 0_i32,
29711        lon: 0_i32,
29712    };
29713    #[cfg(feature = "arbitrary")]
29714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29715        use arbitrary::{Arbitrary, Unstructured};
29716        let mut buf = [0u8; 1024];
29717        rng.fill_bytes(&mut buf);
29718        let mut unstructured = Unstructured::new(&buf);
29719        Self::arbitrary(&mut unstructured).unwrap_or_default()
29720    }
29721}
29722impl Default for TERRAIN_CHECK_DATA {
29723    fn default() -> Self {
29724        Self::DEFAULT.clone()
29725    }
29726}
29727impl MessageData for TERRAIN_CHECK_DATA {
29728    type Message = MavMessage;
29729    const ID: u32 = 135u32;
29730    const NAME: &'static str = "TERRAIN_CHECK";
29731    const EXTRA_CRC: u8 = 203u8;
29732    const ENCODED_LEN: usize = 8usize;
29733    fn deser(
29734        _version: MavlinkVersion,
29735        __input: &[u8],
29736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29737        let avail_len = __input.len();
29738        let mut payload_buf = [0; Self::ENCODED_LEN];
29739        let mut buf = if avail_len < Self::ENCODED_LEN {
29740            payload_buf[0..avail_len].copy_from_slice(__input);
29741            Bytes::new(&payload_buf)
29742        } else {
29743            Bytes::new(__input)
29744        };
29745        let mut __struct = Self::default();
29746        __struct.lat = buf.get_i32_le();
29747        __struct.lon = buf.get_i32_le();
29748        Ok(__struct)
29749    }
29750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29751        let mut __tmp = BytesMut::new(bytes);
29752        #[allow(clippy::absurd_extreme_comparisons)]
29753        #[allow(unused_comparisons)]
29754        if __tmp.remaining() < Self::ENCODED_LEN {
29755            panic!(
29756                "buffer is too small (need {} bytes, but got {})",
29757                Self::ENCODED_LEN,
29758                __tmp.remaining(),
29759            )
29760        }
29761        __tmp.put_i32_le(self.lat);
29762        __tmp.put_i32_le(self.lon);
29763        if matches!(version, MavlinkVersion::V2) {
29764            let len = __tmp.len();
29765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29766        } else {
29767            __tmp.len()
29768        }
29769    }
29770}
29771#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29772#[doc = ""]
29773#[doc = "ID: 134"]
29774#[derive(Debug, Clone, PartialEq)]
29775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29777#[cfg_attr(feature = "ts", derive(TS))]
29778#[cfg_attr(feature = "ts", ts(export))]
29779pub struct TERRAIN_DATA_DATA {
29780    #[doc = "Latitude of SW corner of first grid"]
29781    pub lat: i32,
29782    #[doc = "Longitude of SW corner of first grid"]
29783    pub lon: i32,
29784    #[doc = "Grid spacing"]
29785    pub grid_spacing: u16,
29786    #[doc = "Terrain data MSL"]
29787    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29788    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29789    pub data: [i16; 16],
29790    #[doc = "bit within the terrain request mask"]
29791    pub gridbit: u8,
29792}
29793impl TERRAIN_DATA_DATA {
29794    pub const ENCODED_LEN: usize = 43usize;
29795    pub const DEFAULT: Self = Self {
29796        lat: 0_i32,
29797        lon: 0_i32,
29798        grid_spacing: 0_u16,
29799        data: [0_i16; 16usize],
29800        gridbit: 0_u8,
29801    };
29802    #[cfg(feature = "arbitrary")]
29803    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29804        use arbitrary::{Arbitrary, Unstructured};
29805        let mut buf = [0u8; 1024];
29806        rng.fill_bytes(&mut buf);
29807        let mut unstructured = Unstructured::new(&buf);
29808        Self::arbitrary(&mut unstructured).unwrap_or_default()
29809    }
29810}
29811impl Default for TERRAIN_DATA_DATA {
29812    fn default() -> Self {
29813        Self::DEFAULT.clone()
29814    }
29815}
29816impl MessageData for TERRAIN_DATA_DATA {
29817    type Message = MavMessage;
29818    const ID: u32 = 134u32;
29819    const NAME: &'static str = "TERRAIN_DATA";
29820    const EXTRA_CRC: u8 = 229u8;
29821    const ENCODED_LEN: usize = 43usize;
29822    fn deser(
29823        _version: MavlinkVersion,
29824        __input: &[u8],
29825    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29826        let avail_len = __input.len();
29827        let mut payload_buf = [0; Self::ENCODED_LEN];
29828        let mut buf = if avail_len < Self::ENCODED_LEN {
29829            payload_buf[0..avail_len].copy_from_slice(__input);
29830            Bytes::new(&payload_buf)
29831        } else {
29832            Bytes::new(__input)
29833        };
29834        let mut __struct = Self::default();
29835        __struct.lat = buf.get_i32_le();
29836        __struct.lon = buf.get_i32_le();
29837        __struct.grid_spacing = buf.get_u16_le();
29838        for v in &mut __struct.data {
29839            let val = buf.get_i16_le();
29840            *v = val;
29841        }
29842        __struct.gridbit = buf.get_u8();
29843        Ok(__struct)
29844    }
29845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29846        let mut __tmp = BytesMut::new(bytes);
29847        #[allow(clippy::absurd_extreme_comparisons)]
29848        #[allow(unused_comparisons)]
29849        if __tmp.remaining() < Self::ENCODED_LEN {
29850            panic!(
29851                "buffer is too small (need {} bytes, but got {})",
29852                Self::ENCODED_LEN,
29853                __tmp.remaining(),
29854            )
29855        }
29856        __tmp.put_i32_le(self.lat);
29857        __tmp.put_i32_le(self.lon);
29858        __tmp.put_u16_le(self.grid_spacing);
29859        for val in &self.data {
29860            __tmp.put_i16_le(*val);
29861        }
29862        __tmp.put_u8(self.gridbit);
29863        if matches!(version, MavlinkVersion::V2) {
29864            let len = __tmp.len();
29865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29866        } else {
29867            __tmp.len()
29868        }
29869    }
29870}
29871#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29872#[doc = ""]
29873#[doc = "ID: 136"]
29874#[derive(Debug, Clone, PartialEq)]
29875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29877#[cfg_attr(feature = "ts", derive(TS))]
29878#[cfg_attr(feature = "ts", ts(export))]
29879pub struct TERRAIN_REPORT_DATA {
29880    #[doc = "Latitude"]
29881    pub lat: i32,
29882    #[doc = "Longitude"]
29883    pub lon: i32,
29884    #[doc = "Terrain height MSL"]
29885    pub terrain_height: f32,
29886    #[doc = "Current vehicle height above lat/lon terrain height"]
29887    pub current_height: f32,
29888    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29889    pub spacing: u16,
29890    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29891    pub pending: u16,
29892    #[doc = "Number of 4x4 terrain blocks in memory"]
29893    pub loaded: u16,
29894}
29895impl TERRAIN_REPORT_DATA {
29896    pub const ENCODED_LEN: usize = 22usize;
29897    pub const DEFAULT: Self = Self {
29898        lat: 0_i32,
29899        lon: 0_i32,
29900        terrain_height: 0.0_f32,
29901        current_height: 0.0_f32,
29902        spacing: 0_u16,
29903        pending: 0_u16,
29904        loaded: 0_u16,
29905    };
29906    #[cfg(feature = "arbitrary")]
29907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29908        use arbitrary::{Arbitrary, Unstructured};
29909        let mut buf = [0u8; 1024];
29910        rng.fill_bytes(&mut buf);
29911        let mut unstructured = Unstructured::new(&buf);
29912        Self::arbitrary(&mut unstructured).unwrap_or_default()
29913    }
29914}
29915impl Default for TERRAIN_REPORT_DATA {
29916    fn default() -> Self {
29917        Self::DEFAULT.clone()
29918    }
29919}
29920impl MessageData for TERRAIN_REPORT_DATA {
29921    type Message = MavMessage;
29922    const ID: u32 = 136u32;
29923    const NAME: &'static str = "TERRAIN_REPORT";
29924    const EXTRA_CRC: u8 = 1u8;
29925    const ENCODED_LEN: usize = 22usize;
29926    fn deser(
29927        _version: MavlinkVersion,
29928        __input: &[u8],
29929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29930        let avail_len = __input.len();
29931        let mut payload_buf = [0; Self::ENCODED_LEN];
29932        let mut buf = if avail_len < Self::ENCODED_LEN {
29933            payload_buf[0..avail_len].copy_from_slice(__input);
29934            Bytes::new(&payload_buf)
29935        } else {
29936            Bytes::new(__input)
29937        };
29938        let mut __struct = Self::default();
29939        __struct.lat = buf.get_i32_le();
29940        __struct.lon = buf.get_i32_le();
29941        __struct.terrain_height = buf.get_f32_le();
29942        __struct.current_height = buf.get_f32_le();
29943        __struct.spacing = buf.get_u16_le();
29944        __struct.pending = buf.get_u16_le();
29945        __struct.loaded = buf.get_u16_le();
29946        Ok(__struct)
29947    }
29948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29949        let mut __tmp = BytesMut::new(bytes);
29950        #[allow(clippy::absurd_extreme_comparisons)]
29951        #[allow(unused_comparisons)]
29952        if __tmp.remaining() < Self::ENCODED_LEN {
29953            panic!(
29954                "buffer is too small (need {} bytes, but got {})",
29955                Self::ENCODED_LEN,
29956                __tmp.remaining(),
29957            )
29958        }
29959        __tmp.put_i32_le(self.lat);
29960        __tmp.put_i32_le(self.lon);
29961        __tmp.put_f32_le(self.terrain_height);
29962        __tmp.put_f32_le(self.current_height);
29963        __tmp.put_u16_le(self.spacing);
29964        __tmp.put_u16_le(self.pending);
29965        __tmp.put_u16_le(self.loaded);
29966        if matches!(version, MavlinkVersion::V2) {
29967            let len = __tmp.len();
29968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29969        } else {
29970            __tmp.len()
29971        }
29972    }
29973}
29974#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29975#[doc = ""]
29976#[doc = "ID: 133"]
29977#[derive(Debug, Clone, PartialEq)]
29978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29980#[cfg_attr(feature = "ts", derive(TS))]
29981#[cfg_attr(feature = "ts", ts(export))]
29982pub struct TERRAIN_REQUEST_DATA {
29983    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29984    pub mask: u64,
29985    #[doc = "Latitude of SW corner of first grid"]
29986    pub lat: i32,
29987    #[doc = "Longitude of SW corner of first grid"]
29988    pub lon: i32,
29989    #[doc = "Grid spacing"]
29990    pub grid_spacing: u16,
29991}
29992impl TERRAIN_REQUEST_DATA {
29993    pub const ENCODED_LEN: usize = 18usize;
29994    pub const DEFAULT: Self = Self {
29995        mask: 0_u64,
29996        lat: 0_i32,
29997        lon: 0_i32,
29998        grid_spacing: 0_u16,
29999    };
30000    #[cfg(feature = "arbitrary")]
30001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30002        use arbitrary::{Arbitrary, Unstructured};
30003        let mut buf = [0u8; 1024];
30004        rng.fill_bytes(&mut buf);
30005        let mut unstructured = Unstructured::new(&buf);
30006        Self::arbitrary(&mut unstructured).unwrap_or_default()
30007    }
30008}
30009impl Default for TERRAIN_REQUEST_DATA {
30010    fn default() -> Self {
30011        Self::DEFAULT.clone()
30012    }
30013}
30014impl MessageData for TERRAIN_REQUEST_DATA {
30015    type Message = MavMessage;
30016    const ID: u32 = 133u32;
30017    const NAME: &'static str = "TERRAIN_REQUEST";
30018    const EXTRA_CRC: u8 = 6u8;
30019    const ENCODED_LEN: usize = 18usize;
30020    fn deser(
30021        _version: MavlinkVersion,
30022        __input: &[u8],
30023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30024        let avail_len = __input.len();
30025        let mut payload_buf = [0; Self::ENCODED_LEN];
30026        let mut buf = if avail_len < Self::ENCODED_LEN {
30027            payload_buf[0..avail_len].copy_from_slice(__input);
30028            Bytes::new(&payload_buf)
30029        } else {
30030            Bytes::new(__input)
30031        };
30032        let mut __struct = Self::default();
30033        __struct.mask = buf.get_u64_le();
30034        __struct.lat = buf.get_i32_le();
30035        __struct.lon = buf.get_i32_le();
30036        __struct.grid_spacing = buf.get_u16_le();
30037        Ok(__struct)
30038    }
30039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30040        let mut __tmp = BytesMut::new(bytes);
30041        #[allow(clippy::absurd_extreme_comparisons)]
30042        #[allow(unused_comparisons)]
30043        if __tmp.remaining() < Self::ENCODED_LEN {
30044            panic!(
30045                "buffer is too small (need {} bytes, but got {})",
30046                Self::ENCODED_LEN,
30047                __tmp.remaining(),
30048            )
30049        }
30050        __tmp.put_u64_le(self.mask);
30051        __tmp.put_i32_le(self.lat);
30052        __tmp.put_i32_le(self.lon);
30053        __tmp.put_u16_le(self.grid_spacing);
30054        if matches!(version, MavlinkVersion::V2) {
30055            let len = __tmp.len();
30056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30057        } else {
30058            __tmp.len()
30059        }
30060    }
30061}
30062#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30063#[doc = ""]
30064#[doc = "ID: 111"]
30065#[derive(Debug, Clone, PartialEq)]
30066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30068#[cfg_attr(feature = "ts", derive(TS))]
30069#[cfg_attr(feature = "ts", ts(export))]
30070pub struct TIMESYNC_DATA {
30071    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30072    pub tc1: i64,
30073    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30074    pub ts1: i64,
30075    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30077    pub target_system: u8,
30078    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30080    pub target_component: u8,
30081}
30082impl TIMESYNC_DATA {
30083    pub const ENCODED_LEN: usize = 18usize;
30084    pub const DEFAULT: Self = Self {
30085        tc1: 0_i64,
30086        ts1: 0_i64,
30087        target_system: 0_u8,
30088        target_component: 0_u8,
30089    };
30090    #[cfg(feature = "arbitrary")]
30091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30092        use arbitrary::{Arbitrary, Unstructured};
30093        let mut buf = [0u8; 1024];
30094        rng.fill_bytes(&mut buf);
30095        let mut unstructured = Unstructured::new(&buf);
30096        Self::arbitrary(&mut unstructured).unwrap_or_default()
30097    }
30098}
30099impl Default for TIMESYNC_DATA {
30100    fn default() -> Self {
30101        Self::DEFAULT.clone()
30102    }
30103}
30104impl MessageData for TIMESYNC_DATA {
30105    type Message = MavMessage;
30106    const ID: u32 = 111u32;
30107    const NAME: &'static str = "TIMESYNC";
30108    const EXTRA_CRC: u8 = 34u8;
30109    const ENCODED_LEN: usize = 18usize;
30110    fn deser(
30111        _version: MavlinkVersion,
30112        __input: &[u8],
30113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30114        let avail_len = __input.len();
30115        let mut payload_buf = [0; Self::ENCODED_LEN];
30116        let mut buf = if avail_len < Self::ENCODED_LEN {
30117            payload_buf[0..avail_len].copy_from_slice(__input);
30118            Bytes::new(&payload_buf)
30119        } else {
30120            Bytes::new(__input)
30121        };
30122        let mut __struct = Self::default();
30123        __struct.tc1 = buf.get_i64_le();
30124        __struct.ts1 = buf.get_i64_le();
30125        __struct.target_system = buf.get_u8();
30126        __struct.target_component = buf.get_u8();
30127        Ok(__struct)
30128    }
30129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30130        let mut __tmp = BytesMut::new(bytes);
30131        #[allow(clippy::absurd_extreme_comparisons)]
30132        #[allow(unused_comparisons)]
30133        if __tmp.remaining() < Self::ENCODED_LEN {
30134            panic!(
30135                "buffer is too small (need {} bytes, but got {})",
30136                Self::ENCODED_LEN,
30137                __tmp.remaining(),
30138            )
30139        }
30140        __tmp.put_i64_le(self.tc1);
30141        __tmp.put_i64_le(self.ts1);
30142        if matches!(version, MavlinkVersion::V2) {
30143            __tmp.put_u8(self.target_system);
30144            __tmp.put_u8(self.target_component);
30145            let len = __tmp.len();
30146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30147        } else {
30148            __tmp.len()
30149        }
30150    }
30151}
30152#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30153#[doc = ""]
30154#[doc = "ID: 380"]
30155#[derive(Debug, Clone, PartialEq)]
30156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30158#[cfg_attr(feature = "ts", derive(TS))]
30159#[cfg_attr(feature = "ts", ts(export))]
30160pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30161    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30162    pub safe_return: i32,
30163    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30164    pub land: i32,
30165    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30166    pub mission_next_item: i32,
30167    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30168    pub mission_end: i32,
30169    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30170    pub commanded_action: i32,
30171}
30172impl TIME_ESTIMATE_TO_TARGET_DATA {
30173    pub const ENCODED_LEN: usize = 20usize;
30174    pub const DEFAULT: Self = Self {
30175        safe_return: 0_i32,
30176        land: 0_i32,
30177        mission_next_item: 0_i32,
30178        mission_end: 0_i32,
30179        commanded_action: 0_i32,
30180    };
30181    #[cfg(feature = "arbitrary")]
30182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30183        use arbitrary::{Arbitrary, Unstructured};
30184        let mut buf = [0u8; 1024];
30185        rng.fill_bytes(&mut buf);
30186        let mut unstructured = Unstructured::new(&buf);
30187        Self::arbitrary(&mut unstructured).unwrap_or_default()
30188    }
30189}
30190impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30191    fn default() -> Self {
30192        Self::DEFAULT.clone()
30193    }
30194}
30195impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30196    type Message = MavMessage;
30197    const ID: u32 = 380u32;
30198    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30199    const EXTRA_CRC: u8 = 232u8;
30200    const ENCODED_LEN: usize = 20usize;
30201    fn deser(
30202        _version: MavlinkVersion,
30203        __input: &[u8],
30204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30205        let avail_len = __input.len();
30206        let mut payload_buf = [0; Self::ENCODED_LEN];
30207        let mut buf = if avail_len < Self::ENCODED_LEN {
30208            payload_buf[0..avail_len].copy_from_slice(__input);
30209            Bytes::new(&payload_buf)
30210        } else {
30211            Bytes::new(__input)
30212        };
30213        let mut __struct = Self::default();
30214        __struct.safe_return = buf.get_i32_le();
30215        __struct.land = buf.get_i32_le();
30216        __struct.mission_next_item = buf.get_i32_le();
30217        __struct.mission_end = buf.get_i32_le();
30218        __struct.commanded_action = buf.get_i32_le();
30219        Ok(__struct)
30220    }
30221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30222        let mut __tmp = BytesMut::new(bytes);
30223        #[allow(clippy::absurd_extreme_comparisons)]
30224        #[allow(unused_comparisons)]
30225        if __tmp.remaining() < Self::ENCODED_LEN {
30226            panic!(
30227                "buffer is too small (need {} bytes, but got {})",
30228                Self::ENCODED_LEN,
30229                __tmp.remaining(),
30230            )
30231        }
30232        __tmp.put_i32_le(self.safe_return);
30233        __tmp.put_i32_le(self.land);
30234        __tmp.put_i32_le(self.mission_next_item);
30235        __tmp.put_i32_le(self.mission_end);
30236        __tmp.put_i32_le(self.commanded_action);
30237        if matches!(version, MavlinkVersion::V2) {
30238            let len = __tmp.len();
30239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30240        } else {
30241            __tmp.len()
30242        }
30243    }
30244}
30245#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30246#[doc = ""]
30247#[doc = "ID: 333"]
30248#[derive(Debug, Clone, PartialEq)]
30249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30251#[cfg_attr(feature = "ts", derive(TS))]
30252#[cfg_attr(feature = "ts", ts(export))]
30253pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30254    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30255    pub time_usec: u64,
30256    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30259    pub pos_x: [f32; 5],
30260    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30263    pub pos_y: [f32; 5],
30264    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30265    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30266    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30267    pub pos_z: [f32; 5],
30268    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30271    pub delta: [f32; 5],
30272    #[doc = "Yaw. Set to NaN for unchanged"]
30273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30274    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30275    pub pos_yaw: [f32; 5],
30276    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30277    pub valid_points: u8,
30278}
30279impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30280    pub const ENCODED_LEN: usize = 109usize;
30281    pub const DEFAULT: Self = Self {
30282        time_usec: 0_u64,
30283        pos_x: [0.0_f32; 5usize],
30284        pos_y: [0.0_f32; 5usize],
30285        pos_z: [0.0_f32; 5usize],
30286        delta: [0.0_f32; 5usize],
30287        pos_yaw: [0.0_f32; 5usize],
30288        valid_points: 0_u8,
30289    };
30290    #[cfg(feature = "arbitrary")]
30291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30292        use arbitrary::{Arbitrary, Unstructured};
30293        let mut buf = [0u8; 1024];
30294        rng.fill_bytes(&mut buf);
30295        let mut unstructured = Unstructured::new(&buf);
30296        Self::arbitrary(&mut unstructured).unwrap_or_default()
30297    }
30298}
30299impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30300    fn default() -> Self {
30301        Self::DEFAULT.clone()
30302    }
30303}
30304impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30305    type Message = MavMessage;
30306    const ID: u32 = 333u32;
30307    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30308    const EXTRA_CRC: u8 = 231u8;
30309    const ENCODED_LEN: usize = 109usize;
30310    fn deser(
30311        _version: MavlinkVersion,
30312        __input: &[u8],
30313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30314        let avail_len = __input.len();
30315        let mut payload_buf = [0; Self::ENCODED_LEN];
30316        let mut buf = if avail_len < Self::ENCODED_LEN {
30317            payload_buf[0..avail_len].copy_from_slice(__input);
30318            Bytes::new(&payload_buf)
30319        } else {
30320            Bytes::new(__input)
30321        };
30322        let mut __struct = Self::default();
30323        __struct.time_usec = buf.get_u64_le();
30324        for v in &mut __struct.pos_x {
30325            let val = buf.get_f32_le();
30326            *v = val;
30327        }
30328        for v in &mut __struct.pos_y {
30329            let val = buf.get_f32_le();
30330            *v = val;
30331        }
30332        for v in &mut __struct.pos_z {
30333            let val = buf.get_f32_le();
30334            *v = val;
30335        }
30336        for v in &mut __struct.delta {
30337            let val = buf.get_f32_le();
30338            *v = val;
30339        }
30340        for v in &mut __struct.pos_yaw {
30341            let val = buf.get_f32_le();
30342            *v = val;
30343        }
30344        __struct.valid_points = buf.get_u8();
30345        Ok(__struct)
30346    }
30347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30348        let mut __tmp = BytesMut::new(bytes);
30349        #[allow(clippy::absurd_extreme_comparisons)]
30350        #[allow(unused_comparisons)]
30351        if __tmp.remaining() < Self::ENCODED_LEN {
30352            panic!(
30353                "buffer is too small (need {} bytes, but got {})",
30354                Self::ENCODED_LEN,
30355                __tmp.remaining(),
30356            )
30357        }
30358        __tmp.put_u64_le(self.time_usec);
30359        for val in &self.pos_x {
30360            __tmp.put_f32_le(*val);
30361        }
30362        for val in &self.pos_y {
30363            __tmp.put_f32_le(*val);
30364        }
30365        for val in &self.pos_z {
30366            __tmp.put_f32_le(*val);
30367        }
30368        for val in &self.delta {
30369            __tmp.put_f32_le(*val);
30370        }
30371        for val in &self.pos_yaw {
30372            __tmp.put_f32_le(*val);
30373        }
30374        __tmp.put_u8(self.valid_points);
30375        if matches!(version, MavlinkVersion::V2) {
30376            let len = __tmp.len();
30377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30378        } else {
30379            __tmp.len()
30380        }
30381    }
30382}
30383#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30384#[doc = ""]
30385#[doc = "ID: 332"]
30386#[derive(Debug, Clone, PartialEq)]
30387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30389#[cfg_attr(feature = "ts", derive(TS))]
30390#[cfg_attr(feature = "ts", ts(export))]
30391pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30392    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30393    pub time_usec: u64,
30394    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30395    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30396    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30397    pub pos_x: [f32; 5],
30398    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30400    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30401    pub pos_y: [f32; 5],
30402    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30403    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30404    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30405    pub pos_z: [f32; 5],
30406    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30409    pub vel_x: [f32; 5],
30410    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30413    pub vel_y: [f32; 5],
30414    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30416    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30417    pub vel_z: [f32; 5],
30418    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30421    pub acc_x: [f32; 5],
30422    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30423    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30424    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30425    pub acc_y: [f32; 5],
30426    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30429    pub acc_z: [f32; 5],
30430    #[doc = "Yaw angle, set to NaN if not being used"]
30431    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30432    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30433    pub pos_yaw: [f32; 5],
30434    #[doc = "Yaw rate, set to NaN if not being used"]
30435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30436    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30437    pub vel_yaw: [f32; 5],
30438    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30440    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30441    pub command: [u16; 5],
30442    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30443    pub valid_points: u8,
30444}
30445impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30446    pub const ENCODED_LEN: usize = 239usize;
30447    pub const DEFAULT: Self = Self {
30448        time_usec: 0_u64,
30449        pos_x: [0.0_f32; 5usize],
30450        pos_y: [0.0_f32; 5usize],
30451        pos_z: [0.0_f32; 5usize],
30452        vel_x: [0.0_f32; 5usize],
30453        vel_y: [0.0_f32; 5usize],
30454        vel_z: [0.0_f32; 5usize],
30455        acc_x: [0.0_f32; 5usize],
30456        acc_y: [0.0_f32; 5usize],
30457        acc_z: [0.0_f32; 5usize],
30458        pos_yaw: [0.0_f32; 5usize],
30459        vel_yaw: [0.0_f32; 5usize],
30460        command: [0_u16; 5usize],
30461        valid_points: 0_u8,
30462    };
30463    #[cfg(feature = "arbitrary")]
30464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30465        use arbitrary::{Arbitrary, Unstructured};
30466        let mut buf = [0u8; 1024];
30467        rng.fill_bytes(&mut buf);
30468        let mut unstructured = Unstructured::new(&buf);
30469        Self::arbitrary(&mut unstructured).unwrap_or_default()
30470    }
30471}
30472impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30473    fn default() -> Self {
30474        Self::DEFAULT.clone()
30475    }
30476}
30477impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30478    type Message = MavMessage;
30479    const ID: u32 = 332u32;
30480    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30481    const EXTRA_CRC: u8 = 236u8;
30482    const ENCODED_LEN: usize = 239usize;
30483    fn deser(
30484        _version: MavlinkVersion,
30485        __input: &[u8],
30486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30487        let avail_len = __input.len();
30488        let mut payload_buf = [0; Self::ENCODED_LEN];
30489        let mut buf = if avail_len < Self::ENCODED_LEN {
30490            payload_buf[0..avail_len].copy_from_slice(__input);
30491            Bytes::new(&payload_buf)
30492        } else {
30493            Bytes::new(__input)
30494        };
30495        let mut __struct = Self::default();
30496        __struct.time_usec = buf.get_u64_le();
30497        for v in &mut __struct.pos_x {
30498            let val = buf.get_f32_le();
30499            *v = val;
30500        }
30501        for v in &mut __struct.pos_y {
30502            let val = buf.get_f32_le();
30503            *v = val;
30504        }
30505        for v in &mut __struct.pos_z {
30506            let val = buf.get_f32_le();
30507            *v = val;
30508        }
30509        for v in &mut __struct.vel_x {
30510            let val = buf.get_f32_le();
30511            *v = val;
30512        }
30513        for v in &mut __struct.vel_y {
30514            let val = buf.get_f32_le();
30515            *v = val;
30516        }
30517        for v in &mut __struct.vel_z {
30518            let val = buf.get_f32_le();
30519            *v = val;
30520        }
30521        for v in &mut __struct.acc_x {
30522            let val = buf.get_f32_le();
30523            *v = val;
30524        }
30525        for v in &mut __struct.acc_y {
30526            let val = buf.get_f32_le();
30527            *v = val;
30528        }
30529        for v in &mut __struct.acc_z {
30530            let val = buf.get_f32_le();
30531            *v = val;
30532        }
30533        for v in &mut __struct.pos_yaw {
30534            let val = buf.get_f32_le();
30535            *v = val;
30536        }
30537        for v in &mut __struct.vel_yaw {
30538            let val = buf.get_f32_le();
30539            *v = val;
30540        }
30541        for v in &mut __struct.command {
30542            let val = buf.get_u16_le();
30543            *v = val;
30544        }
30545        __struct.valid_points = buf.get_u8();
30546        Ok(__struct)
30547    }
30548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30549        let mut __tmp = BytesMut::new(bytes);
30550        #[allow(clippy::absurd_extreme_comparisons)]
30551        #[allow(unused_comparisons)]
30552        if __tmp.remaining() < Self::ENCODED_LEN {
30553            panic!(
30554                "buffer is too small (need {} bytes, but got {})",
30555                Self::ENCODED_LEN,
30556                __tmp.remaining(),
30557            )
30558        }
30559        __tmp.put_u64_le(self.time_usec);
30560        for val in &self.pos_x {
30561            __tmp.put_f32_le(*val);
30562        }
30563        for val in &self.pos_y {
30564            __tmp.put_f32_le(*val);
30565        }
30566        for val in &self.pos_z {
30567            __tmp.put_f32_le(*val);
30568        }
30569        for val in &self.vel_x {
30570            __tmp.put_f32_le(*val);
30571        }
30572        for val in &self.vel_y {
30573            __tmp.put_f32_le(*val);
30574        }
30575        for val in &self.vel_z {
30576            __tmp.put_f32_le(*val);
30577        }
30578        for val in &self.acc_x {
30579            __tmp.put_f32_le(*val);
30580        }
30581        for val in &self.acc_y {
30582            __tmp.put_f32_le(*val);
30583        }
30584        for val in &self.acc_z {
30585            __tmp.put_f32_le(*val);
30586        }
30587        for val in &self.pos_yaw {
30588            __tmp.put_f32_le(*val);
30589        }
30590        for val in &self.vel_yaw {
30591            __tmp.put_f32_le(*val);
30592        }
30593        for val in &self.command {
30594            __tmp.put_u16_le(*val);
30595        }
30596        __tmp.put_u8(self.valid_points);
30597        if matches!(version, MavlinkVersion::V2) {
30598            let len = __tmp.len();
30599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30600        } else {
30601            __tmp.len()
30602        }
30603    }
30604}
30605#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30606#[doc = ""]
30607#[doc = "ID: 385"]
30608#[derive(Debug, Clone, PartialEq)]
30609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30611#[cfg_attr(feature = "ts", derive(TS))]
30612#[cfg_attr(feature = "ts", ts(export))]
30613pub struct TUNNEL_DATA {
30614    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30615    pub payload_type: MavTunnelPayloadType,
30616    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30617    pub target_system: u8,
30618    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30619    pub target_component: u8,
30620    #[doc = "Length of the data transported in payload"]
30621    pub payload_length: u8,
30622    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30625    pub payload: [u8; 128],
30626}
30627impl TUNNEL_DATA {
30628    pub const ENCODED_LEN: usize = 133usize;
30629    pub const DEFAULT: Self = Self {
30630        payload_type: MavTunnelPayloadType::DEFAULT,
30631        target_system: 0_u8,
30632        target_component: 0_u8,
30633        payload_length: 0_u8,
30634        payload: [0_u8; 128usize],
30635    };
30636    #[cfg(feature = "arbitrary")]
30637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30638        use arbitrary::{Arbitrary, Unstructured};
30639        let mut buf = [0u8; 1024];
30640        rng.fill_bytes(&mut buf);
30641        let mut unstructured = Unstructured::new(&buf);
30642        Self::arbitrary(&mut unstructured).unwrap_or_default()
30643    }
30644}
30645impl Default for TUNNEL_DATA {
30646    fn default() -> Self {
30647        Self::DEFAULT.clone()
30648    }
30649}
30650impl MessageData for TUNNEL_DATA {
30651    type Message = MavMessage;
30652    const ID: u32 = 385u32;
30653    const NAME: &'static str = "TUNNEL";
30654    const EXTRA_CRC: u8 = 147u8;
30655    const ENCODED_LEN: usize = 133usize;
30656    fn deser(
30657        _version: MavlinkVersion,
30658        __input: &[u8],
30659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30660        let avail_len = __input.len();
30661        let mut payload_buf = [0; Self::ENCODED_LEN];
30662        let mut buf = if avail_len < Self::ENCODED_LEN {
30663            payload_buf[0..avail_len].copy_from_slice(__input);
30664            Bytes::new(&payload_buf)
30665        } else {
30666            Bytes::new(__input)
30667        };
30668        let mut __struct = Self::default();
30669        let tmp = buf.get_u16_le();
30670        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30671            ::mavlink_core::error::ParserError::InvalidEnum {
30672                enum_type: "MavTunnelPayloadType",
30673                value: tmp as u64,
30674            },
30675        )?;
30676        __struct.target_system = buf.get_u8();
30677        __struct.target_component = buf.get_u8();
30678        __struct.payload_length = buf.get_u8();
30679        for v in &mut __struct.payload {
30680            let val = buf.get_u8();
30681            *v = val;
30682        }
30683        Ok(__struct)
30684    }
30685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30686        let mut __tmp = BytesMut::new(bytes);
30687        #[allow(clippy::absurd_extreme_comparisons)]
30688        #[allow(unused_comparisons)]
30689        if __tmp.remaining() < Self::ENCODED_LEN {
30690            panic!(
30691                "buffer is too small (need {} bytes, but got {})",
30692                Self::ENCODED_LEN,
30693                __tmp.remaining(),
30694            )
30695        }
30696        __tmp.put_u16_le(self.payload_type as u16);
30697        __tmp.put_u8(self.target_system);
30698        __tmp.put_u8(self.target_component);
30699        __tmp.put_u8(self.payload_length);
30700        for val in &self.payload {
30701            __tmp.put_u8(*val);
30702        }
30703        if matches!(version, MavlinkVersion::V2) {
30704            let len = __tmp.len();
30705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30706        } else {
30707            __tmp.len()
30708        }
30709    }
30710}
30711#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30712#[doc = ""]
30713#[doc = "ID: 311"]
30714#[derive(Debug, Clone, PartialEq)]
30715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30717#[cfg_attr(feature = "ts", derive(TS))]
30718#[cfg_attr(feature = "ts", ts(export))]
30719pub struct UAVCAN_NODE_INFO_DATA {
30720    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30721    pub time_usec: u64,
30722    #[doc = "Time since the start-up of the node."]
30723    pub uptime_sec: u32,
30724    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30725    pub sw_vcs_commit: u32,
30726    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30727    #[cfg_attr(feature = "ts", ts(type = "string"))]
30728    pub name: CharArray<80>,
30729    #[doc = "Hardware major version number."]
30730    pub hw_version_major: u8,
30731    #[doc = "Hardware minor version number."]
30732    pub hw_version_minor: u8,
30733    #[doc = "Hardware unique 128-bit ID."]
30734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30735    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30736    pub hw_unique_id: [u8; 16],
30737    #[doc = "Software major version number."]
30738    pub sw_version_major: u8,
30739    #[doc = "Software minor version number."]
30740    pub sw_version_minor: u8,
30741}
30742impl UAVCAN_NODE_INFO_DATA {
30743    pub const ENCODED_LEN: usize = 116usize;
30744    pub const DEFAULT: Self = Self {
30745        time_usec: 0_u64,
30746        uptime_sec: 0_u32,
30747        sw_vcs_commit: 0_u32,
30748        name: CharArray::new([0_u8; 80usize]),
30749        hw_version_major: 0_u8,
30750        hw_version_minor: 0_u8,
30751        hw_unique_id: [0_u8; 16usize],
30752        sw_version_major: 0_u8,
30753        sw_version_minor: 0_u8,
30754    };
30755    #[cfg(feature = "arbitrary")]
30756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30757        use arbitrary::{Arbitrary, Unstructured};
30758        let mut buf = [0u8; 1024];
30759        rng.fill_bytes(&mut buf);
30760        let mut unstructured = Unstructured::new(&buf);
30761        Self::arbitrary(&mut unstructured).unwrap_or_default()
30762    }
30763}
30764impl Default for UAVCAN_NODE_INFO_DATA {
30765    fn default() -> Self {
30766        Self::DEFAULT.clone()
30767    }
30768}
30769impl MessageData for UAVCAN_NODE_INFO_DATA {
30770    type Message = MavMessage;
30771    const ID: u32 = 311u32;
30772    const NAME: &'static str = "UAVCAN_NODE_INFO";
30773    const EXTRA_CRC: u8 = 95u8;
30774    const ENCODED_LEN: usize = 116usize;
30775    fn deser(
30776        _version: MavlinkVersion,
30777        __input: &[u8],
30778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30779        let avail_len = __input.len();
30780        let mut payload_buf = [0; Self::ENCODED_LEN];
30781        let mut buf = if avail_len < Self::ENCODED_LEN {
30782            payload_buf[0..avail_len].copy_from_slice(__input);
30783            Bytes::new(&payload_buf)
30784        } else {
30785            Bytes::new(__input)
30786        };
30787        let mut __struct = Self::default();
30788        __struct.time_usec = buf.get_u64_le();
30789        __struct.uptime_sec = buf.get_u32_le();
30790        __struct.sw_vcs_commit = buf.get_u32_le();
30791        let mut tmp = [0_u8; 80usize];
30792        for v in &mut tmp {
30793            *v = buf.get_u8();
30794        }
30795        __struct.name = CharArray::new(tmp);
30796        __struct.hw_version_major = buf.get_u8();
30797        __struct.hw_version_minor = buf.get_u8();
30798        for v in &mut __struct.hw_unique_id {
30799            let val = buf.get_u8();
30800            *v = val;
30801        }
30802        __struct.sw_version_major = buf.get_u8();
30803        __struct.sw_version_minor = buf.get_u8();
30804        Ok(__struct)
30805    }
30806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30807        let mut __tmp = BytesMut::new(bytes);
30808        #[allow(clippy::absurd_extreme_comparisons)]
30809        #[allow(unused_comparisons)]
30810        if __tmp.remaining() < Self::ENCODED_LEN {
30811            panic!(
30812                "buffer is too small (need {} bytes, but got {})",
30813                Self::ENCODED_LEN,
30814                __tmp.remaining(),
30815            )
30816        }
30817        __tmp.put_u64_le(self.time_usec);
30818        __tmp.put_u32_le(self.uptime_sec);
30819        __tmp.put_u32_le(self.sw_vcs_commit);
30820        for val in &self.name {
30821            __tmp.put_u8(*val);
30822        }
30823        __tmp.put_u8(self.hw_version_major);
30824        __tmp.put_u8(self.hw_version_minor);
30825        for val in &self.hw_unique_id {
30826            __tmp.put_u8(*val);
30827        }
30828        __tmp.put_u8(self.sw_version_major);
30829        __tmp.put_u8(self.sw_version_minor);
30830        if matches!(version, MavlinkVersion::V2) {
30831            let len = __tmp.len();
30832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30833        } else {
30834            __tmp.len()
30835        }
30836    }
30837}
30838#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30839#[doc = ""]
30840#[doc = "ID: 310"]
30841#[derive(Debug, Clone, PartialEq)]
30842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30844#[cfg_attr(feature = "ts", derive(TS))]
30845#[cfg_attr(feature = "ts", ts(export))]
30846pub struct UAVCAN_NODE_STATUS_DATA {
30847    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30848    pub time_usec: u64,
30849    #[doc = "Time since the start-up of the node."]
30850    pub uptime_sec: u32,
30851    #[doc = "Vendor-specific status information."]
30852    pub vendor_specific_status_code: u16,
30853    #[doc = "Generalized node health status."]
30854    pub health: UavcanNodeHealth,
30855    #[doc = "Generalized operating mode."]
30856    pub mode: UavcanNodeMode,
30857    #[doc = "Not used currently."]
30858    pub sub_mode: u8,
30859}
30860impl UAVCAN_NODE_STATUS_DATA {
30861    pub const ENCODED_LEN: usize = 17usize;
30862    pub const DEFAULT: Self = Self {
30863        time_usec: 0_u64,
30864        uptime_sec: 0_u32,
30865        vendor_specific_status_code: 0_u16,
30866        health: UavcanNodeHealth::DEFAULT,
30867        mode: UavcanNodeMode::DEFAULT,
30868        sub_mode: 0_u8,
30869    };
30870    #[cfg(feature = "arbitrary")]
30871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30872        use arbitrary::{Arbitrary, Unstructured};
30873        let mut buf = [0u8; 1024];
30874        rng.fill_bytes(&mut buf);
30875        let mut unstructured = Unstructured::new(&buf);
30876        Self::arbitrary(&mut unstructured).unwrap_or_default()
30877    }
30878}
30879impl Default for UAVCAN_NODE_STATUS_DATA {
30880    fn default() -> Self {
30881        Self::DEFAULT.clone()
30882    }
30883}
30884impl MessageData for UAVCAN_NODE_STATUS_DATA {
30885    type Message = MavMessage;
30886    const ID: u32 = 310u32;
30887    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30888    const EXTRA_CRC: u8 = 28u8;
30889    const ENCODED_LEN: usize = 17usize;
30890    fn deser(
30891        _version: MavlinkVersion,
30892        __input: &[u8],
30893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30894        let avail_len = __input.len();
30895        let mut payload_buf = [0; Self::ENCODED_LEN];
30896        let mut buf = if avail_len < Self::ENCODED_LEN {
30897            payload_buf[0..avail_len].copy_from_slice(__input);
30898            Bytes::new(&payload_buf)
30899        } else {
30900            Bytes::new(__input)
30901        };
30902        let mut __struct = Self::default();
30903        __struct.time_usec = buf.get_u64_le();
30904        __struct.uptime_sec = buf.get_u32_le();
30905        __struct.vendor_specific_status_code = buf.get_u16_le();
30906        let tmp = buf.get_u8();
30907        __struct.health =
30908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30909                enum_type: "UavcanNodeHealth",
30910                value: tmp as u64,
30911            })?;
30912        let tmp = buf.get_u8();
30913        __struct.mode =
30914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30915                enum_type: "UavcanNodeMode",
30916                value: tmp as u64,
30917            })?;
30918        __struct.sub_mode = buf.get_u8();
30919        Ok(__struct)
30920    }
30921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30922        let mut __tmp = BytesMut::new(bytes);
30923        #[allow(clippy::absurd_extreme_comparisons)]
30924        #[allow(unused_comparisons)]
30925        if __tmp.remaining() < Self::ENCODED_LEN {
30926            panic!(
30927                "buffer is too small (need {} bytes, but got {})",
30928                Self::ENCODED_LEN,
30929                __tmp.remaining(),
30930            )
30931        }
30932        __tmp.put_u64_le(self.time_usec);
30933        __tmp.put_u32_le(self.uptime_sec);
30934        __tmp.put_u16_le(self.vendor_specific_status_code);
30935        __tmp.put_u8(self.health as u8);
30936        __tmp.put_u8(self.mode as u8);
30937        __tmp.put_u8(self.sub_mode);
30938        if matches!(version, MavlinkVersion::V2) {
30939            let len = __tmp.len();
30940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30941        } else {
30942            __tmp.len()
30943        }
30944    }
30945}
30946#[doc = "The global position resulting from GPS and sensor fusion."]
30947#[doc = ""]
30948#[doc = "ID: 340"]
30949#[derive(Debug, Clone, PartialEq)]
30950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30952#[cfg_attr(feature = "ts", derive(TS))]
30953#[cfg_attr(feature = "ts", ts(export))]
30954pub struct UTM_GLOBAL_POSITION_DATA {
30955    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30956    pub time: u64,
30957    #[doc = "Latitude (WGS84)"]
30958    pub lat: i32,
30959    #[doc = "Longitude (WGS84)"]
30960    pub lon: i32,
30961    #[doc = "Altitude (WGS84)"]
30962    pub alt: i32,
30963    #[doc = "Altitude above ground"]
30964    pub relative_alt: i32,
30965    #[doc = "Next waypoint, latitude (WGS84)"]
30966    pub next_lat: i32,
30967    #[doc = "Next waypoint, longitude (WGS84)"]
30968    pub next_lon: i32,
30969    #[doc = "Next waypoint, altitude (WGS84)"]
30970    pub next_alt: i32,
30971    #[doc = "Ground X speed (latitude, positive north)"]
30972    pub vx: i16,
30973    #[doc = "Ground Y speed (longitude, positive east)"]
30974    pub vy: i16,
30975    #[doc = "Ground Z speed (altitude, positive down)"]
30976    pub vz: i16,
30977    #[doc = "Horizontal position uncertainty (standard deviation)"]
30978    pub h_acc: u16,
30979    #[doc = "Altitude uncertainty (standard deviation)"]
30980    pub v_acc: u16,
30981    #[doc = "Speed uncertainty (standard deviation)"]
30982    pub vel_acc: u16,
30983    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30984    pub update_rate: u16,
30985    #[doc = "Unique UAS ID."]
30986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30987    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30988    pub uas_id: [u8; 18],
30989    #[doc = "Flight state"]
30990    pub flight_state: UtmFlightState,
30991    #[doc = "Bitwise OR combination of the data available flags."]
30992    pub flags: UtmDataAvailFlags,
30993}
30994impl UTM_GLOBAL_POSITION_DATA {
30995    pub const ENCODED_LEN: usize = 70usize;
30996    pub const DEFAULT: Self = Self {
30997        time: 0_u64,
30998        lat: 0_i32,
30999        lon: 0_i32,
31000        alt: 0_i32,
31001        relative_alt: 0_i32,
31002        next_lat: 0_i32,
31003        next_lon: 0_i32,
31004        next_alt: 0_i32,
31005        vx: 0_i16,
31006        vy: 0_i16,
31007        vz: 0_i16,
31008        h_acc: 0_u16,
31009        v_acc: 0_u16,
31010        vel_acc: 0_u16,
31011        update_rate: 0_u16,
31012        uas_id: [0_u8; 18usize],
31013        flight_state: UtmFlightState::DEFAULT,
31014        flags: UtmDataAvailFlags::DEFAULT,
31015    };
31016    #[cfg(feature = "arbitrary")]
31017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31018        use arbitrary::{Arbitrary, Unstructured};
31019        let mut buf = [0u8; 1024];
31020        rng.fill_bytes(&mut buf);
31021        let mut unstructured = Unstructured::new(&buf);
31022        Self::arbitrary(&mut unstructured).unwrap_or_default()
31023    }
31024}
31025impl Default for UTM_GLOBAL_POSITION_DATA {
31026    fn default() -> Self {
31027        Self::DEFAULT.clone()
31028    }
31029}
31030impl MessageData for UTM_GLOBAL_POSITION_DATA {
31031    type Message = MavMessage;
31032    const ID: u32 = 340u32;
31033    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31034    const EXTRA_CRC: u8 = 99u8;
31035    const ENCODED_LEN: usize = 70usize;
31036    fn deser(
31037        _version: MavlinkVersion,
31038        __input: &[u8],
31039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31040        let avail_len = __input.len();
31041        let mut payload_buf = [0; Self::ENCODED_LEN];
31042        let mut buf = if avail_len < Self::ENCODED_LEN {
31043            payload_buf[0..avail_len].copy_from_slice(__input);
31044            Bytes::new(&payload_buf)
31045        } else {
31046            Bytes::new(__input)
31047        };
31048        let mut __struct = Self::default();
31049        __struct.time = buf.get_u64_le();
31050        __struct.lat = buf.get_i32_le();
31051        __struct.lon = buf.get_i32_le();
31052        __struct.alt = buf.get_i32_le();
31053        __struct.relative_alt = buf.get_i32_le();
31054        __struct.next_lat = buf.get_i32_le();
31055        __struct.next_lon = buf.get_i32_le();
31056        __struct.next_alt = buf.get_i32_le();
31057        __struct.vx = buf.get_i16_le();
31058        __struct.vy = buf.get_i16_le();
31059        __struct.vz = buf.get_i16_le();
31060        __struct.h_acc = buf.get_u16_le();
31061        __struct.v_acc = buf.get_u16_le();
31062        __struct.vel_acc = buf.get_u16_le();
31063        __struct.update_rate = buf.get_u16_le();
31064        for v in &mut __struct.uas_id {
31065            let val = buf.get_u8();
31066            *v = val;
31067        }
31068        let tmp = buf.get_u8();
31069        __struct.flight_state =
31070            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31071                enum_type: "UtmFlightState",
31072                value: tmp as u64,
31073            })?;
31074        let tmp = buf.get_u8();
31075        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31076            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31077                flag_type: "UtmDataAvailFlags",
31078                value: tmp as u64,
31079            })?;
31080        Ok(__struct)
31081    }
31082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31083        let mut __tmp = BytesMut::new(bytes);
31084        #[allow(clippy::absurd_extreme_comparisons)]
31085        #[allow(unused_comparisons)]
31086        if __tmp.remaining() < Self::ENCODED_LEN {
31087            panic!(
31088                "buffer is too small (need {} bytes, but got {})",
31089                Self::ENCODED_LEN,
31090                __tmp.remaining(),
31091            )
31092        }
31093        __tmp.put_u64_le(self.time);
31094        __tmp.put_i32_le(self.lat);
31095        __tmp.put_i32_le(self.lon);
31096        __tmp.put_i32_le(self.alt);
31097        __tmp.put_i32_le(self.relative_alt);
31098        __tmp.put_i32_le(self.next_lat);
31099        __tmp.put_i32_le(self.next_lon);
31100        __tmp.put_i32_le(self.next_alt);
31101        __tmp.put_i16_le(self.vx);
31102        __tmp.put_i16_le(self.vy);
31103        __tmp.put_i16_le(self.vz);
31104        __tmp.put_u16_le(self.h_acc);
31105        __tmp.put_u16_le(self.v_acc);
31106        __tmp.put_u16_le(self.vel_acc);
31107        __tmp.put_u16_le(self.update_rate);
31108        for val in &self.uas_id {
31109            __tmp.put_u8(*val);
31110        }
31111        __tmp.put_u8(self.flight_state as u8);
31112        __tmp.put_u8(self.flags.bits() as u8);
31113        if matches!(version, MavlinkVersion::V2) {
31114            let len = __tmp.len();
31115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31116        } else {
31117            __tmp.len()
31118        }
31119    }
31120}
31121#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31122#[doc = ""]
31123#[doc = "ID: 248"]
31124#[derive(Debug, Clone, PartialEq)]
31125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31127#[cfg_attr(feature = "ts", derive(TS))]
31128#[cfg_attr(feature = "ts", ts(export))]
31129pub struct V2_EXTENSION_DATA {
31130    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31131    pub message_type: u16,
31132    #[doc = "Network ID (0 for broadcast)"]
31133    pub target_network: u8,
31134    #[doc = "System ID (0 for broadcast)"]
31135    pub target_system: u8,
31136    #[doc = "Component ID (0 for broadcast)"]
31137    pub target_component: u8,
31138    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31140    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31141    pub payload: [u8; 249],
31142}
31143impl V2_EXTENSION_DATA {
31144    pub const ENCODED_LEN: usize = 254usize;
31145    pub const DEFAULT: Self = Self {
31146        message_type: 0_u16,
31147        target_network: 0_u8,
31148        target_system: 0_u8,
31149        target_component: 0_u8,
31150        payload: [0_u8; 249usize],
31151    };
31152    #[cfg(feature = "arbitrary")]
31153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31154        use arbitrary::{Arbitrary, Unstructured};
31155        let mut buf = [0u8; 1024];
31156        rng.fill_bytes(&mut buf);
31157        let mut unstructured = Unstructured::new(&buf);
31158        Self::arbitrary(&mut unstructured).unwrap_or_default()
31159    }
31160}
31161impl Default for V2_EXTENSION_DATA {
31162    fn default() -> Self {
31163        Self::DEFAULT.clone()
31164    }
31165}
31166impl MessageData for V2_EXTENSION_DATA {
31167    type Message = MavMessage;
31168    const ID: u32 = 248u32;
31169    const NAME: &'static str = "V2_EXTENSION";
31170    const EXTRA_CRC: u8 = 8u8;
31171    const ENCODED_LEN: usize = 254usize;
31172    fn deser(
31173        _version: MavlinkVersion,
31174        __input: &[u8],
31175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31176        let avail_len = __input.len();
31177        let mut payload_buf = [0; Self::ENCODED_LEN];
31178        let mut buf = if avail_len < Self::ENCODED_LEN {
31179            payload_buf[0..avail_len].copy_from_slice(__input);
31180            Bytes::new(&payload_buf)
31181        } else {
31182            Bytes::new(__input)
31183        };
31184        let mut __struct = Self::default();
31185        __struct.message_type = buf.get_u16_le();
31186        __struct.target_network = buf.get_u8();
31187        __struct.target_system = buf.get_u8();
31188        __struct.target_component = buf.get_u8();
31189        for v in &mut __struct.payload {
31190            let val = buf.get_u8();
31191            *v = val;
31192        }
31193        Ok(__struct)
31194    }
31195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31196        let mut __tmp = BytesMut::new(bytes);
31197        #[allow(clippy::absurd_extreme_comparisons)]
31198        #[allow(unused_comparisons)]
31199        if __tmp.remaining() < Self::ENCODED_LEN {
31200            panic!(
31201                "buffer is too small (need {} bytes, but got {})",
31202                Self::ENCODED_LEN,
31203                __tmp.remaining(),
31204            )
31205        }
31206        __tmp.put_u16_le(self.message_type);
31207        __tmp.put_u8(self.target_network);
31208        __tmp.put_u8(self.target_system);
31209        __tmp.put_u8(self.target_component);
31210        for val in &self.payload {
31211            __tmp.put_u8(*val);
31212        }
31213        if matches!(version, MavlinkVersion::V2) {
31214            let len = __tmp.len();
31215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31216        } else {
31217            __tmp.len()
31218        }
31219    }
31220}
31221#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31222#[doc = ""]
31223#[doc = "ID: 74"]
31224#[derive(Debug, Clone, PartialEq)]
31225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31227#[cfg_attr(feature = "ts", derive(TS))]
31228#[cfg_attr(feature = "ts", ts(export))]
31229pub struct VFR_HUD_DATA {
31230    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31231    pub airspeed: f32,
31232    #[doc = "Current ground speed."]
31233    pub groundspeed: f32,
31234    #[doc = "Current altitude (MSL)."]
31235    pub alt: f32,
31236    #[doc = "Current climb rate."]
31237    pub climb: f32,
31238    #[doc = "Current heading in compass units (0-360, 0=north)."]
31239    pub heading: i16,
31240    #[doc = "Current throttle setting (0 to 100)."]
31241    pub throttle: u16,
31242}
31243impl VFR_HUD_DATA {
31244    pub const ENCODED_LEN: usize = 20usize;
31245    pub const DEFAULT: Self = Self {
31246        airspeed: 0.0_f32,
31247        groundspeed: 0.0_f32,
31248        alt: 0.0_f32,
31249        climb: 0.0_f32,
31250        heading: 0_i16,
31251        throttle: 0_u16,
31252    };
31253    #[cfg(feature = "arbitrary")]
31254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31255        use arbitrary::{Arbitrary, Unstructured};
31256        let mut buf = [0u8; 1024];
31257        rng.fill_bytes(&mut buf);
31258        let mut unstructured = Unstructured::new(&buf);
31259        Self::arbitrary(&mut unstructured).unwrap_or_default()
31260    }
31261}
31262impl Default for VFR_HUD_DATA {
31263    fn default() -> Self {
31264        Self::DEFAULT.clone()
31265    }
31266}
31267impl MessageData for VFR_HUD_DATA {
31268    type Message = MavMessage;
31269    const ID: u32 = 74u32;
31270    const NAME: &'static str = "VFR_HUD";
31271    const EXTRA_CRC: u8 = 20u8;
31272    const ENCODED_LEN: usize = 20usize;
31273    fn deser(
31274        _version: MavlinkVersion,
31275        __input: &[u8],
31276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31277        let avail_len = __input.len();
31278        let mut payload_buf = [0; Self::ENCODED_LEN];
31279        let mut buf = if avail_len < Self::ENCODED_LEN {
31280            payload_buf[0..avail_len].copy_from_slice(__input);
31281            Bytes::new(&payload_buf)
31282        } else {
31283            Bytes::new(__input)
31284        };
31285        let mut __struct = Self::default();
31286        __struct.airspeed = buf.get_f32_le();
31287        __struct.groundspeed = buf.get_f32_le();
31288        __struct.alt = buf.get_f32_le();
31289        __struct.climb = buf.get_f32_le();
31290        __struct.heading = buf.get_i16_le();
31291        __struct.throttle = buf.get_u16_le();
31292        Ok(__struct)
31293    }
31294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31295        let mut __tmp = BytesMut::new(bytes);
31296        #[allow(clippy::absurd_extreme_comparisons)]
31297        #[allow(unused_comparisons)]
31298        if __tmp.remaining() < Self::ENCODED_LEN {
31299            panic!(
31300                "buffer is too small (need {} bytes, but got {})",
31301                Self::ENCODED_LEN,
31302                __tmp.remaining(),
31303            )
31304        }
31305        __tmp.put_f32_le(self.airspeed);
31306        __tmp.put_f32_le(self.groundspeed);
31307        __tmp.put_f32_le(self.alt);
31308        __tmp.put_f32_le(self.climb);
31309        __tmp.put_i16_le(self.heading);
31310        __tmp.put_u16_le(self.throttle);
31311        if matches!(version, MavlinkVersion::V2) {
31312            let len = __tmp.len();
31313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31314        } else {
31315            __tmp.len()
31316        }
31317    }
31318}
31319#[doc = "Vibration levels and accelerometer clipping."]
31320#[doc = ""]
31321#[doc = "ID: 241"]
31322#[derive(Debug, Clone, PartialEq)]
31323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31325#[cfg_attr(feature = "ts", derive(TS))]
31326#[cfg_attr(feature = "ts", ts(export))]
31327pub struct VIBRATION_DATA {
31328    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31329    pub time_usec: u64,
31330    #[doc = "Vibration levels on X-axis"]
31331    pub vibration_x: f32,
31332    #[doc = "Vibration levels on Y-axis"]
31333    pub vibration_y: f32,
31334    #[doc = "Vibration levels on Z-axis"]
31335    pub vibration_z: f32,
31336    #[doc = "first accelerometer clipping count"]
31337    pub clipping_0: u32,
31338    #[doc = "second accelerometer clipping count"]
31339    pub clipping_1: u32,
31340    #[doc = "third accelerometer clipping count"]
31341    pub clipping_2: u32,
31342}
31343impl VIBRATION_DATA {
31344    pub const ENCODED_LEN: usize = 32usize;
31345    pub const DEFAULT: Self = Self {
31346        time_usec: 0_u64,
31347        vibration_x: 0.0_f32,
31348        vibration_y: 0.0_f32,
31349        vibration_z: 0.0_f32,
31350        clipping_0: 0_u32,
31351        clipping_1: 0_u32,
31352        clipping_2: 0_u32,
31353    };
31354    #[cfg(feature = "arbitrary")]
31355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31356        use arbitrary::{Arbitrary, Unstructured};
31357        let mut buf = [0u8; 1024];
31358        rng.fill_bytes(&mut buf);
31359        let mut unstructured = Unstructured::new(&buf);
31360        Self::arbitrary(&mut unstructured).unwrap_or_default()
31361    }
31362}
31363impl Default for VIBRATION_DATA {
31364    fn default() -> Self {
31365        Self::DEFAULT.clone()
31366    }
31367}
31368impl MessageData for VIBRATION_DATA {
31369    type Message = MavMessage;
31370    const ID: u32 = 241u32;
31371    const NAME: &'static str = "VIBRATION";
31372    const EXTRA_CRC: u8 = 90u8;
31373    const ENCODED_LEN: usize = 32usize;
31374    fn deser(
31375        _version: MavlinkVersion,
31376        __input: &[u8],
31377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31378        let avail_len = __input.len();
31379        let mut payload_buf = [0; Self::ENCODED_LEN];
31380        let mut buf = if avail_len < Self::ENCODED_LEN {
31381            payload_buf[0..avail_len].copy_from_slice(__input);
31382            Bytes::new(&payload_buf)
31383        } else {
31384            Bytes::new(__input)
31385        };
31386        let mut __struct = Self::default();
31387        __struct.time_usec = buf.get_u64_le();
31388        __struct.vibration_x = buf.get_f32_le();
31389        __struct.vibration_y = buf.get_f32_le();
31390        __struct.vibration_z = buf.get_f32_le();
31391        __struct.clipping_0 = buf.get_u32_le();
31392        __struct.clipping_1 = buf.get_u32_le();
31393        __struct.clipping_2 = buf.get_u32_le();
31394        Ok(__struct)
31395    }
31396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31397        let mut __tmp = BytesMut::new(bytes);
31398        #[allow(clippy::absurd_extreme_comparisons)]
31399        #[allow(unused_comparisons)]
31400        if __tmp.remaining() < Self::ENCODED_LEN {
31401            panic!(
31402                "buffer is too small (need {} bytes, but got {})",
31403                Self::ENCODED_LEN,
31404                __tmp.remaining(),
31405            )
31406        }
31407        __tmp.put_u64_le(self.time_usec);
31408        __tmp.put_f32_le(self.vibration_x);
31409        __tmp.put_f32_le(self.vibration_y);
31410        __tmp.put_f32_le(self.vibration_z);
31411        __tmp.put_u32_le(self.clipping_0);
31412        __tmp.put_u32_le(self.clipping_1);
31413        __tmp.put_u32_le(self.clipping_2);
31414        if matches!(version, MavlinkVersion::V2) {
31415            let len = __tmp.len();
31416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31417        } else {
31418            __tmp.len()
31419        }
31420    }
31421}
31422#[doc = "Global position estimate from a Vicon motion system source."]
31423#[doc = ""]
31424#[doc = "ID: 104"]
31425#[derive(Debug, Clone, PartialEq)]
31426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31428#[cfg_attr(feature = "ts", derive(TS))]
31429#[cfg_attr(feature = "ts", ts(export))]
31430pub struct VICON_POSITION_ESTIMATE_DATA {
31431    #[doc = "Timestamp (UNIX time or time since system boot)"]
31432    pub usec: u64,
31433    #[doc = "Global X position"]
31434    pub x: f32,
31435    #[doc = "Global Y position"]
31436    pub y: f32,
31437    #[doc = "Global Z position"]
31438    pub z: f32,
31439    #[doc = "Roll angle"]
31440    pub roll: f32,
31441    #[doc = "Pitch angle"]
31442    pub pitch: f32,
31443    #[doc = "Yaw angle"]
31444    pub yaw: f32,
31445    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31448    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31449    pub covariance: [f32; 21],
31450}
31451impl VICON_POSITION_ESTIMATE_DATA {
31452    pub const ENCODED_LEN: usize = 116usize;
31453    pub const DEFAULT: Self = Self {
31454        usec: 0_u64,
31455        x: 0.0_f32,
31456        y: 0.0_f32,
31457        z: 0.0_f32,
31458        roll: 0.0_f32,
31459        pitch: 0.0_f32,
31460        yaw: 0.0_f32,
31461        covariance: [0.0_f32; 21usize],
31462    };
31463    #[cfg(feature = "arbitrary")]
31464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31465        use arbitrary::{Arbitrary, Unstructured};
31466        let mut buf = [0u8; 1024];
31467        rng.fill_bytes(&mut buf);
31468        let mut unstructured = Unstructured::new(&buf);
31469        Self::arbitrary(&mut unstructured).unwrap_or_default()
31470    }
31471}
31472impl Default for VICON_POSITION_ESTIMATE_DATA {
31473    fn default() -> Self {
31474        Self::DEFAULT.clone()
31475    }
31476}
31477impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31478    type Message = MavMessage;
31479    const ID: u32 = 104u32;
31480    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31481    const EXTRA_CRC: u8 = 56u8;
31482    const ENCODED_LEN: usize = 116usize;
31483    fn deser(
31484        _version: MavlinkVersion,
31485        __input: &[u8],
31486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31487        let avail_len = __input.len();
31488        let mut payload_buf = [0; Self::ENCODED_LEN];
31489        let mut buf = if avail_len < Self::ENCODED_LEN {
31490            payload_buf[0..avail_len].copy_from_slice(__input);
31491            Bytes::new(&payload_buf)
31492        } else {
31493            Bytes::new(__input)
31494        };
31495        let mut __struct = Self::default();
31496        __struct.usec = buf.get_u64_le();
31497        __struct.x = buf.get_f32_le();
31498        __struct.y = buf.get_f32_le();
31499        __struct.z = buf.get_f32_le();
31500        __struct.roll = buf.get_f32_le();
31501        __struct.pitch = buf.get_f32_le();
31502        __struct.yaw = buf.get_f32_le();
31503        for v in &mut __struct.covariance {
31504            let val = buf.get_f32_le();
31505            *v = val;
31506        }
31507        Ok(__struct)
31508    }
31509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31510        let mut __tmp = BytesMut::new(bytes);
31511        #[allow(clippy::absurd_extreme_comparisons)]
31512        #[allow(unused_comparisons)]
31513        if __tmp.remaining() < Self::ENCODED_LEN {
31514            panic!(
31515                "buffer is too small (need {} bytes, but got {})",
31516                Self::ENCODED_LEN,
31517                __tmp.remaining(),
31518            )
31519        }
31520        __tmp.put_u64_le(self.usec);
31521        __tmp.put_f32_le(self.x);
31522        __tmp.put_f32_le(self.y);
31523        __tmp.put_f32_le(self.z);
31524        __tmp.put_f32_le(self.roll);
31525        __tmp.put_f32_le(self.pitch);
31526        __tmp.put_f32_le(self.yaw);
31527        if matches!(version, MavlinkVersion::V2) {
31528            for val in &self.covariance {
31529                __tmp.put_f32_le(*val);
31530            }
31531            let len = __tmp.len();
31532            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31533        } else {
31534            __tmp.len()
31535        }
31536    }
31537}
31538#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31539#[doc = ""]
31540#[doc = "ID: 269"]
31541#[derive(Debug, Clone, PartialEq)]
31542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31543#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31544#[cfg_attr(feature = "ts", derive(TS))]
31545#[cfg_attr(feature = "ts", ts(export))]
31546pub struct VIDEO_STREAM_INFORMATION_DATA {
31547    #[doc = "Frame rate."]
31548    pub framerate: f32,
31549    #[doc = "Bit rate."]
31550    pub bitrate: u32,
31551    #[doc = "Bitmap of stream status flags."]
31552    pub flags: VideoStreamStatusFlags,
31553    #[doc = "Horizontal resolution."]
31554    pub resolution_h: u16,
31555    #[doc = "Vertical resolution."]
31556    pub resolution_v: u16,
31557    #[doc = "Video image rotation clockwise."]
31558    pub rotation: u16,
31559    #[doc = "Horizontal Field of view."]
31560    pub hfov: u16,
31561    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31562    pub stream_id: u8,
31563    #[doc = "Number of streams available."]
31564    pub count: u8,
31565    #[doc = "Type of stream."]
31566    pub mavtype: VideoStreamType,
31567    #[doc = "Stream name."]
31568    #[cfg_attr(feature = "ts", ts(type = "string"))]
31569    pub name: CharArray<32>,
31570    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31571    #[cfg_attr(feature = "ts", ts(type = "string"))]
31572    pub uri: CharArray<160>,
31573    #[doc = "Encoding of stream."]
31574    #[cfg_attr(feature = "serde", serde(default))]
31575    pub encoding: VideoStreamEncoding,
31576    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31577    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31578    pub camera_device_id: u8,
31579}
31580impl VIDEO_STREAM_INFORMATION_DATA {
31581    pub const ENCODED_LEN: usize = 215usize;
31582    pub const DEFAULT: Self = Self {
31583        framerate: 0.0_f32,
31584        bitrate: 0_u32,
31585        flags: VideoStreamStatusFlags::DEFAULT,
31586        resolution_h: 0_u16,
31587        resolution_v: 0_u16,
31588        rotation: 0_u16,
31589        hfov: 0_u16,
31590        stream_id: 0_u8,
31591        count: 0_u8,
31592        mavtype: VideoStreamType::DEFAULT,
31593        name: CharArray::new([0_u8; 32usize]),
31594        uri: CharArray::new([0_u8; 160usize]),
31595        encoding: VideoStreamEncoding::DEFAULT,
31596        camera_device_id: 0_u8,
31597    };
31598    #[cfg(feature = "arbitrary")]
31599    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31600        use arbitrary::{Arbitrary, Unstructured};
31601        let mut buf = [0u8; 1024];
31602        rng.fill_bytes(&mut buf);
31603        let mut unstructured = Unstructured::new(&buf);
31604        Self::arbitrary(&mut unstructured).unwrap_or_default()
31605    }
31606}
31607impl Default for VIDEO_STREAM_INFORMATION_DATA {
31608    fn default() -> Self {
31609        Self::DEFAULT.clone()
31610    }
31611}
31612impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31613    type Message = MavMessage;
31614    const ID: u32 = 269u32;
31615    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31616    const EXTRA_CRC: u8 = 109u8;
31617    const ENCODED_LEN: usize = 215usize;
31618    fn deser(
31619        _version: MavlinkVersion,
31620        __input: &[u8],
31621    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31622        let avail_len = __input.len();
31623        let mut payload_buf = [0; Self::ENCODED_LEN];
31624        let mut buf = if avail_len < Self::ENCODED_LEN {
31625            payload_buf[0..avail_len].copy_from_slice(__input);
31626            Bytes::new(&payload_buf)
31627        } else {
31628            Bytes::new(__input)
31629        };
31630        let mut __struct = Self::default();
31631        __struct.framerate = buf.get_f32_le();
31632        __struct.bitrate = buf.get_u32_le();
31633        let tmp = buf.get_u16_le();
31634        __struct.flags =
31635            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31636                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31637                    flag_type: "VideoStreamStatusFlags",
31638                    value: tmp as u64,
31639                })?;
31640        __struct.resolution_h = buf.get_u16_le();
31641        __struct.resolution_v = buf.get_u16_le();
31642        __struct.rotation = buf.get_u16_le();
31643        __struct.hfov = buf.get_u16_le();
31644        __struct.stream_id = buf.get_u8();
31645        __struct.count = buf.get_u8();
31646        let tmp = buf.get_u8();
31647        __struct.mavtype =
31648            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31649                enum_type: "VideoStreamType",
31650                value: tmp as u64,
31651            })?;
31652        let mut tmp = [0_u8; 32usize];
31653        for v in &mut tmp {
31654            *v = buf.get_u8();
31655        }
31656        __struct.name = CharArray::new(tmp);
31657        let mut tmp = [0_u8; 160usize];
31658        for v in &mut tmp {
31659            *v = buf.get_u8();
31660        }
31661        __struct.uri = CharArray::new(tmp);
31662        let tmp = buf.get_u8();
31663        __struct.encoding =
31664            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31665                enum_type: "VideoStreamEncoding",
31666                value: tmp as u64,
31667            })?;
31668        __struct.camera_device_id = buf.get_u8();
31669        Ok(__struct)
31670    }
31671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31672        let mut __tmp = BytesMut::new(bytes);
31673        #[allow(clippy::absurd_extreme_comparisons)]
31674        #[allow(unused_comparisons)]
31675        if __tmp.remaining() < Self::ENCODED_LEN {
31676            panic!(
31677                "buffer is too small (need {} bytes, but got {})",
31678                Self::ENCODED_LEN,
31679                __tmp.remaining(),
31680            )
31681        }
31682        __tmp.put_f32_le(self.framerate);
31683        __tmp.put_u32_le(self.bitrate);
31684        __tmp.put_u16_le(self.flags.bits() as u16);
31685        __tmp.put_u16_le(self.resolution_h);
31686        __tmp.put_u16_le(self.resolution_v);
31687        __tmp.put_u16_le(self.rotation);
31688        __tmp.put_u16_le(self.hfov);
31689        __tmp.put_u8(self.stream_id);
31690        __tmp.put_u8(self.count);
31691        __tmp.put_u8(self.mavtype as u8);
31692        for val in &self.name {
31693            __tmp.put_u8(*val);
31694        }
31695        for val in &self.uri {
31696            __tmp.put_u8(*val);
31697        }
31698        if matches!(version, MavlinkVersion::V2) {
31699            __tmp.put_u8(self.encoding as u8);
31700            __tmp.put_u8(self.camera_device_id);
31701            let len = __tmp.len();
31702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31703        } else {
31704            __tmp.len()
31705        }
31706    }
31707}
31708#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31709#[doc = ""]
31710#[doc = "ID: 270"]
31711#[derive(Debug, Clone, PartialEq)]
31712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31714#[cfg_attr(feature = "ts", derive(TS))]
31715#[cfg_attr(feature = "ts", ts(export))]
31716pub struct VIDEO_STREAM_STATUS_DATA {
31717    #[doc = "Frame rate"]
31718    pub framerate: f32,
31719    #[doc = "Bit rate"]
31720    pub bitrate: u32,
31721    #[doc = "Bitmap of stream status flags"]
31722    pub flags: VideoStreamStatusFlags,
31723    #[doc = "Horizontal resolution"]
31724    pub resolution_h: u16,
31725    #[doc = "Vertical resolution"]
31726    pub resolution_v: u16,
31727    #[doc = "Video image rotation clockwise"]
31728    pub rotation: u16,
31729    #[doc = "Horizontal Field of view"]
31730    pub hfov: u16,
31731    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31732    pub stream_id: u8,
31733    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31734    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31735    pub camera_device_id: u8,
31736}
31737impl VIDEO_STREAM_STATUS_DATA {
31738    pub const ENCODED_LEN: usize = 20usize;
31739    pub const DEFAULT: Self = Self {
31740        framerate: 0.0_f32,
31741        bitrate: 0_u32,
31742        flags: VideoStreamStatusFlags::DEFAULT,
31743        resolution_h: 0_u16,
31744        resolution_v: 0_u16,
31745        rotation: 0_u16,
31746        hfov: 0_u16,
31747        stream_id: 0_u8,
31748        camera_device_id: 0_u8,
31749    };
31750    #[cfg(feature = "arbitrary")]
31751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31752        use arbitrary::{Arbitrary, Unstructured};
31753        let mut buf = [0u8; 1024];
31754        rng.fill_bytes(&mut buf);
31755        let mut unstructured = Unstructured::new(&buf);
31756        Self::arbitrary(&mut unstructured).unwrap_or_default()
31757    }
31758}
31759impl Default for VIDEO_STREAM_STATUS_DATA {
31760    fn default() -> Self {
31761        Self::DEFAULT.clone()
31762    }
31763}
31764impl MessageData for VIDEO_STREAM_STATUS_DATA {
31765    type Message = MavMessage;
31766    const ID: u32 = 270u32;
31767    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31768    const EXTRA_CRC: u8 = 59u8;
31769    const ENCODED_LEN: usize = 20usize;
31770    fn deser(
31771        _version: MavlinkVersion,
31772        __input: &[u8],
31773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31774        let avail_len = __input.len();
31775        let mut payload_buf = [0; Self::ENCODED_LEN];
31776        let mut buf = if avail_len < Self::ENCODED_LEN {
31777            payload_buf[0..avail_len].copy_from_slice(__input);
31778            Bytes::new(&payload_buf)
31779        } else {
31780            Bytes::new(__input)
31781        };
31782        let mut __struct = Self::default();
31783        __struct.framerate = buf.get_f32_le();
31784        __struct.bitrate = buf.get_u32_le();
31785        let tmp = buf.get_u16_le();
31786        __struct.flags =
31787            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31788                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31789                    flag_type: "VideoStreamStatusFlags",
31790                    value: tmp as u64,
31791                })?;
31792        __struct.resolution_h = buf.get_u16_le();
31793        __struct.resolution_v = buf.get_u16_le();
31794        __struct.rotation = buf.get_u16_le();
31795        __struct.hfov = buf.get_u16_le();
31796        __struct.stream_id = buf.get_u8();
31797        __struct.camera_device_id = buf.get_u8();
31798        Ok(__struct)
31799    }
31800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31801        let mut __tmp = BytesMut::new(bytes);
31802        #[allow(clippy::absurd_extreme_comparisons)]
31803        #[allow(unused_comparisons)]
31804        if __tmp.remaining() < Self::ENCODED_LEN {
31805            panic!(
31806                "buffer is too small (need {} bytes, but got {})",
31807                Self::ENCODED_LEN,
31808                __tmp.remaining(),
31809            )
31810        }
31811        __tmp.put_f32_le(self.framerate);
31812        __tmp.put_u32_le(self.bitrate);
31813        __tmp.put_u16_le(self.flags.bits() as u16);
31814        __tmp.put_u16_le(self.resolution_h);
31815        __tmp.put_u16_le(self.resolution_v);
31816        __tmp.put_u16_le(self.rotation);
31817        __tmp.put_u16_le(self.hfov);
31818        __tmp.put_u8(self.stream_id);
31819        if matches!(version, MavlinkVersion::V2) {
31820            __tmp.put_u8(self.camera_device_id);
31821            let len = __tmp.len();
31822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31823        } else {
31824            __tmp.len()
31825        }
31826    }
31827}
31828#[doc = "Local position/attitude estimate from a vision source."]
31829#[doc = ""]
31830#[doc = "ID: 102"]
31831#[derive(Debug, Clone, PartialEq)]
31832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31834#[cfg_attr(feature = "ts", derive(TS))]
31835#[cfg_attr(feature = "ts", ts(export))]
31836pub struct VISION_POSITION_ESTIMATE_DATA {
31837    #[doc = "Timestamp (UNIX time or time since system boot)"]
31838    pub usec: u64,
31839    #[doc = "Local X position"]
31840    pub x: f32,
31841    #[doc = "Local Y position"]
31842    pub y: f32,
31843    #[doc = "Local Z position"]
31844    pub z: f32,
31845    #[doc = "Roll angle"]
31846    pub roll: f32,
31847    #[doc = "Pitch angle"]
31848    pub pitch: f32,
31849    #[doc = "Yaw angle"]
31850    pub yaw: f32,
31851    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31854    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31855    pub covariance: [f32; 21],
31856    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31857    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31858    pub reset_counter: u8,
31859}
31860impl VISION_POSITION_ESTIMATE_DATA {
31861    pub const ENCODED_LEN: usize = 117usize;
31862    pub const DEFAULT: Self = Self {
31863        usec: 0_u64,
31864        x: 0.0_f32,
31865        y: 0.0_f32,
31866        z: 0.0_f32,
31867        roll: 0.0_f32,
31868        pitch: 0.0_f32,
31869        yaw: 0.0_f32,
31870        covariance: [0.0_f32; 21usize],
31871        reset_counter: 0_u8,
31872    };
31873    #[cfg(feature = "arbitrary")]
31874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31875        use arbitrary::{Arbitrary, Unstructured};
31876        let mut buf = [0u8; 1024];
31877        rng.fill_bytes(&mut buf);
31878        let mut unstructured = Unstructured::new(&buf);
31879        Self::arbitrary(&mut unstructured).unwrap_or_default()
31880    }
31881}
31882impl Default for VISION_POSITION_ESTIMATE_DATA {
31883    fn default() -> Self {
31884        Self::DEFAULT.clone()
31885    }
31886}
31887impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31888    type Message = MavMessage;
31889    const ID: u32 = 102u32;
31890    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31891    const EXTRA_CRC: u8 = 158u8;
31892    const ENCODED_LEN: usize = 117usize;
31893    fn deser(
31894        _version: MavlinkVersion,
31895        __input: &[u8],
31896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31897        let avail_len = __input.len();
31898        let mut payload_buf = [0; Self::ENCODED_LEN];
31899        let mut buf = if avail_len < Self::ENCODED_LEN {
31900            payload_buf[0..avail_len].copy_from_slice(__input);
31901            Bytes::new(&payload_buf)
31902        } else {
31903            Bytes::new(__input)
31904        };
31905        let mut __struct = Self::default();
31906        __struct.usec = buf.get_u64_le();
31907        __struct.x = buf.get_f32_le();
31908        __struct.y = buf.get_f32_le();
31909        __struct.z = buf.get_f32_le();
31910        __struct.roll = buf.get_f32_le();
31911        __struct.pitch = buf.get_f32_le();
31912        __struct.yaw = buf.get_f32_le();
31913        for v in &mut __struct.covariance {
31914            let val = buf.get_f32_le();
31915            *v = val;
31916        }
31917        __struct.reset_counter = buf.get_u8();
31918        Ok(__struct)
31919    }
31920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31921        let mut __tmp = BytesMut::new(bytes);
31922        #[allow(clippy::absurd_extreme_comparisons)]
31923        #[allow(unused_comparisons)]
31924        if __tmp.remaining() < Self::ENCODED_LEN {
31925            panic!(
31926                "buffer is too small (need {} bytes, but got {})",
31927                Self::ENCODED_LEN,
31928                __tmp.remaining(),
31929            )
31930        }
31931        __tmp.put_u64_le(self.usec);
31932        __tmp.put_f32_le(self.x);
31933        __tmp.put_f32_le(self.y);
31934        __tmp.put_f32_le(self.z);
31935        __tmp.put_f32_le(self.roll);
31936        __tmp.put_f32_le(self.pitch);
31937        __tmp.put_f32_le(self.yaw);
31938        if matches!(version, MavlinkVersion::V2) {
31939            for val in &self.covariance {
31940                __tmp.put_f32_le(*val);
31941            }
31942            __tmp.put_u8(self.reset_counter);
31943            let len = __tmp.len();
31944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31945        } else {
31946            __tmp.len()
31947        }
31948    }
31949}
31950#[doc = "Speed estimate from a vision source."]
31951#[doc = ""]
31952#[doc = "ID: 103"]
31953#[derive(Debug, Clone, PartialEq)]
31954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31956#[cfg_attr(feature = "ts", derive(TS))]
31957#[cfg_attr(feature = "ts", ts(export))]
31958pub struct VISION_SPEED_ESTIMATE_DATA {
31959    #[doc = "Timestamp (UNIX time or time since system boot)"]
31960    pub usec: u64,
31961    #[doc = "Global X speed"]
31962    pub x: f32,
31963    #[doc = "Global Y speed"]
31964    pub y: f32,
31965    #[doc = "Global Z speed"]
31966    pub z: f32,
31967    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31970    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31971    pub covariance: [f32; 9],
31972    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31974    pub reset_counter: u8,
31975}
31976impl VISION_SPEED_ESTIMATE_DATA {
31977    pub const ENCODED_LEN: usize = 57usize;
31978    pub const DEFAULT: Self = Self {
31979        usec: 0_u64,
31980        x: 0.0_f32,
31981        y: 0.0_f32,
31982        z: 0.0_f32,
31983        covariance: [0.0_f32; 9usize],
31984        reset_counter: 0_u8,
31985    };
31986    #[cfg(feature = "arbitrary")]
31987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31988        use arbitrary::{Arbitrary, Unstructured};
31989        let mut buf = [0u8; 1024];
31990        rng.fill_bytes(&mut buf);
31991        let mut unstructured = Unstructured::new(&buf);
31992        Self::arbitrary(&mut unstructured).unwrap_or_default()
31993    }
31994}
31995impl Default for VISION_SPEED_ESTIMATE_DATA {
31996    fn default() -> Self {
31997        Self::DEFAULT.clone()
31998    }
31999}
32000impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32001    type Message = MavMessage;
32002    const ID: u32 = 103u32;
32003    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32004    const EXTRA_CRC: u8 = 208u8;
32005    const ENCODED_LEN: usize = 57usize;
32006    fn deser(
32007        _version: MavlinkVersion,
32008        __input: &[u8],
32009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32010        let avail_len = __input.len();
32011        let mut payload_buf = [0; Self::ENCODED_LEN];
32012        let mut buf = if avail_len < Self::ENCODED_LEN {
32013            payload_buf[0..avail_len].copy_from_slice(__input);
32014            Bytes::new(&payload_buf)
32015        } else {
32016            Bytes::new(__input)
32017        };
32018        let mut __struct = Self::default();
32019        __struct.usec = buf.get_u64_le();
32020        __struct.x = buf.get_f32_le();
32021        __struct.y = buf.get_f32_le();
32022        __struct.z = buf.get_f32_le();
32023        for v in &mut __struct.covariance {
32024            let val = buf.get_f32_le();
32025            *v = val;
32026        }
32027        __struct.reset_counter = buf.get_u8();
32028        Ok(__struct)
32029    }
32030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32031        let mut __tmp = BytesMut::new(bytes);
32032        #[allow(clippy::absurd_extreme_comparisons)]
32033        #[allow(unused_comparisons)]
32034        if __tmp.remaining() < Self::ENCODED_LEN {
32035            panic!(
32036                "buffer is too small (need {} bytes, but got {})",
32037                Self::ENCODED_LEN,
32038                __tmp.remaining(),
32039            )
32040        }
32041        __tmp.put_u64_le(self.usec);
32042        __tmp.put_f32_le(self.x);
32043        __tmp.put_f32_le(self.y);
32044        __tmp.put_f32_le(self.z);
32045        if matches!(version, MavlinkVersion::V2) {
32046            for val in &self.covariance {
32047                __tmp.put_f32_le(*val);
32048            }
32049            __tmp.put_u8(self.reset_counter);
32050            let len = __tmp.len();
32051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32052        } else {
32053            __tmp.len()
32054        }
32055    }
32056}
32057#[doc = "Cumulative distance traveled for each reported wheel."]
32058#[doc = ""]
32059#[doc = "ID: 9000"]
32060#[derive(Debug, Clone, PartialEq)]
32061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32063#[cfg_attr(feature = "ts", derive(TS))]
32064#[cfg_attr(feature = "ts", ts(export))]
32065pub struct WHEEL_DISTANCE_DATA {
32066    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32067    pub time_usec: u64,
32068    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32070    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32071    pub distance: [f64; 16],
32072    #[doc = "Number of wheels reported."]
32073    pub count: u8,
32074}
32075impl WHEEL_DISTANCE_DATA {
32076    pub const ENCODED_LEN: usize = 137usize;
32077    pub const DEFAULT: Self = Self {
32078        time_usec: 0_u64,
32079        distance: [0.0_f64; 16usize],
32080        count: 0_u8,
32081    };
32082    #[cfg(feature = "arbitrary")]
32083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32084        use arbitrary::{Arbitrary, Unstructured};
32085        let mut buf = [0u8; 1024];
32086        rng.fill_bytes(&mut buf);
32087        let mut unstructured = Unstructured::new(&buf);
32088        Self::arbitrary(&mut unstructured).unwrap_or_default()
32089    }
32090}
32091impl Default for WHEEL_DISTANCE_DATA {
32092    fn default() -> Self {
32093        Self::DEFAULT.clone()
32094    }
32095}
32096impl MessageData for WHEEL_DISTANCE_DATA {
32097    type Message = MavMessage;
32098    const ID: u32 = 9000u32;
32099    const NAME: &'static str = "WHEEL_DISTANCE";
32100    const EXTRA_CRC: u8 = 113u8;
32101    const ENCODED_LEN: usize = 137usize;
32102    fn deser(
32103        _version: MavlinkVersion,
32104        __input: &[u8],
32105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32106        let avail_len = __input.len();
32107        let mut payload_buf = [0; Self::ENCODED_LEN];
32108        let mut buf = if avail_len < Self::ENCODED_LEN {
32109            payload_buf[0..avail_len].copy_from_slice(__input);
32110            Bytes::new(&payload_buf)
32111        } else {
32112            Bytes::new(__input)
32113        };
32114        let mut __struct = Self::default();
32115        __struct.time_usec = buf.get_u64_le();
32116        for v in &mut __struct.distance {
32117            let val = buf.get_f64_le();
32118            *v = val;
32119        }
32120        __struct.count = buf.get_u8();
32121        Ok(__struct)
32122    }
32123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32124        let mut __tmp = BytesMut::new(bytes);
32125        #[allow(clippy::absurd_extreme_comparisons)]
32126        #[allow(unused_comparisons)]
32127        if __tmp.remaining() < Self::ENCODED_LEN {
32128            panic!(
32129                "buffer is too small (need {} bytes, but got {})",
32130                Self::ENCODED_LEN,
32131                __tmp.remaining(),
32132            )
32133        }
32134        __tmp.put_u64_le(self.time_usec);
32135        for val in &self.distance {
32136            __tmp.put_f64_le(*val);
32137        }
32138        __tmp.put_u8(self.count);
32139        if matches!(version, MavlinkVersion::V2) {
32140            let len = __tmp.len();
32141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32142        } else {
32143            __tmp.len()
32144        }
32145    }
32146}
32147#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32148#[doc = ""]
32149#[doc = "ID: 299"]
32150#[derive(Debug, Clone, PartialEq)]
32151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32153#[cfg_attr(feature = "ts", derive(TS))]
32154#[cfg_attr(feature = "ts", ts(export))]
32155pub struct WIFI_CONFIG_AP_DATA {
32156    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32157    #[cfg_attr(feature = "ts", ts(type = "string"))]
32158    pub ssid: CharArray<32>,
32159    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32160    #[cfg_attr(feature = "ts", ts(type = "string"))]
32161    pub password: CharArray<64>,
32162    #[doc = "WiFi Mode."]
32163    #[cfg_attr(feature = "serde", serde(default))]
32164    pub mode: WifiConfigApMode,
32165    #[doc = "Message acceptance response (sent back to GS)."]
32166    #[cfg_attr(feature = "serde", serde(default))]
32167    pub response: WifiConfigApResponse,
32168}
32169impl WIFI_CONFIG_AP_DATA {
32170    pub const ENCODED_LEN: usize = 98usize;
32171    pub const DEFAULT: Self = Self {
32172        ssid: CharArray::new([0_u8; 32usize]),
32173        password: CharArray::new([0_u8; 64usize]),
32174        mode: WifiConfigApMode::DEFAULT,
32175        response: WifiConfigApResponse::DEFAULT,
32176    };
32177    #[cfg(feature = "arbitrary")]
32178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32179        use arbitrary::{Arbitrary, Unstructured};
32180        let mut buf = [0u8; 1024];
32181        rng.fill_bytes(&mut buf);
32182        let mut unstructured = Unstructured::new(&buf);
32183        Self::arbitrary(&mut unstructured).unwrap_or_default()
32184    }
32185}
32186impl Default for WIFI_CONFIG_AP_DATA {
32187    fn default() -> Self {
32188        Self::DEFAULT.clone()
32189    }
32190}
32191impl MessageData for WIFI_CONFIG_AP_DATA {
32192    type Message = MavMessage;
32193    const ID: u32 = 299u32;
32194    const NAME: &'static str = "WIFI_CONFIG_AP";
32195    const EXTRA_CRC: u8 = 19u8;
32196    const ENCODED_LEN: usize = 98usize;
32197    fn deser(
32198        _version: MavlinkVersion,
32199        __input: &[u8],
32200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32201        let avail_len = __input.len();
32202        let mut payload_buf = [0; Self::ENCODED_LEN];
32203        let mut buf = if avail_len < Self::ENCODED_LEN {
32204            payload_buf[0..avail_len].copy_from_slice(__input);
32205            Bytes::new(&payload_buf)
32206        } else {
32207            Bytes::new(__input)
32208        };
32209        let mut __struct = Self::default();
32210        let mut tmp = [0_u8; 32usize];
32211        for v in &mut tmp {
32212            *v = buf.get_u8();
32213        }
32214        __struct.ssid = CharArray::new(tmp);
32215        let mut tmp = [0_u8; 64usize];
32216        for v in &mut tmp {
32217            *v = buf.get_u8();
32218        }
32219        __struct.password = CharArray::new(tmp);
32220        let tmp = buf.get_i8();
32221        __struct.mode =
32222            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32223                enum_type: "WifiConfigApMode",
32224                value: tmp as u64,
32225            })?;
32226        let tmp = buf.get_i8();
32227        __struct.response =
32228            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32229                enum_type: "WifiConfigApResponse",
32230                value: tmp as u64,
32231            })?;
32232        Ok(__struct)
32233    }
32234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32235        let mut __tmp = BytesMut::new(bytes);
32236        #[allow(clippy::absurd_extreme_comparisons)]
32237        #[allow(unused_comparisons)]
32238        if __tmp.remaining() < Self::ENCODED_LEN {
32239            panic!(
32240                "buffer is too small (need {} bytes, but got {})",
32241                Self::ENCODED_LEN,
32242                __tmp.remaining(),
32243            )
32244        }
32245        for val in &self.ssid {
32246            __tmp.put_u8(*val);
32247        }
32248        for val in &self.password {
32249            __tmp.put_u8(*val);
32250        }
32251        if matches!(version, MavlinkVersion::V2) {
32252            __tmp.put_i8(self.mode as i8);
32253            __tmp.put_i8(self.response as i8);
32254            let len = __tmp.len();
32255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32256        } else {
32257            __tmp.len()
32258        }
32259    }
32260}
32261#[doc = "Winch status."]
32262#[doc = ""]
32263#[doc = "ID: 9005"]
32264#[derive(Debug, Clone, PartialEq)]
32265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32267#[cfg_attr(feature = "ts", derive(TS))]
32268#[cfg_attr(feature = "ts", ts(export))]
32269pub struct WINCH_STATUS_DATA {
32270    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32271    pub time_usec: u64,
32272    #[doc = "Length of line released. NaN if unknown"]
32273    pub line_length: f32,
32274    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32275    pub speed: f32,
32276    #[doc = "Tension on the line. NaN if unknown"]
32277    pub tension: f32,
32278    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32279    pub voltage: f32,
32280    #[doc = "Current draw from the winch. NaN if unknown"]
32281    pub current: f32,
32282    #[doc = "Status flags"]
32283    pub status: MavWinchStatusFlag,
32284    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32285    pub temperature: i16,
32286}
32287impl WINCH_STATUS_DATA {
32288    pub const ENCODED_LEN: usize = 34usize;
32289    pub const DEFAULT: Self = Self {
32290        time_usec: 0_u64,
32291        line_length: 0.0_f32,
32292        speed: 0.0_f32,
32293        tension: 0.0_f32,
32294        voltage: 0.0_f32,
32295        current: 0.0_f32,
32296        status: MavWinchStatusFlag::DEFAULT,
32297        temperature: 0_i16,
32298    };
32299    #[cfg(feature = "arbitrary")]
32300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32301        use arbitrary::{Arbitrary, Unstructured};
32302        let mut buf = [0u8; 1024];
32303        rng.fill_bytes(&mut buf);
32304        let mut unstructured = Unstructured::new(&buf);
32305        Self::arbitrary(&mut unstructured).unwrap_or_default()
32306    }
32307}
32308impl Default for WINCH_STATUS_DATA {
32309    fn default() -> Self {
32310        Self::DEFAULT.clone()
32311    }
32312}
32313impl MessageData for WINCH_STATUS_DATA {
32314    type Message = MavMessage;
32315    const ID: u32 = 9005u32;
32316    const NAME: &'static str = "WINCH_STATUS";
32317    const EXTRA_CRC: u8 = 117u8;
32318    const ENCODED_LEN: usize = 34usize;
32319    fn deser(
32320        _version: MavlinkVersion,
32321        __input: &[u8],
32322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32323        let avail_len = __input.len();
32324        let mut payload_buf = [0; Self::ENCODED_LEN];
32325        let mut buf = if avail_len < Self::ENCODED_LEN {
32326            payload_buf[0..avail_len].copy_from_slice(__input);
32327            Bytes::new(&payload_buf)
32328        } else {
32329            Bytes::new(__input)
32330        };
32331        let mut __struct = Self::default();
32332        __struct.time_usec = buf.get_u64_le();
32333        __struct.line_length = buf.get_f32_le();
32334        __struct.speed = buf.get_f32_le();
32335        __struct.tension = buf.get_f32_le();
32336        __struct.voltage = buf.get_f32_le();
32337        __struct.current = buf.get_f32_le();
32338        let tmp = buf.get_u32_le();
32339        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32340            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32341                flag_type: "MavWinchStatusFlag",
32342                value: tmp as u64,
32343            })?;
32344        __struct.temperature = buf.get_i16_le();
32345        Ok(__struct)
32346    }
32347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32348        let mut __tmp = BytesMut::new(bytes);
32349        #[allow(clippy::absurd_extreme_comparisons)]
32350        #[allow(unused_comparisons)]
32351        if __tmp.remaining() < Self::ENCODED_LEN {
32352            panic!(
32353                "buffer is too small (need {} bytes, but got {})",
32354                Self::ENCODED_LEN,
32355                __tmp.remaining(),
32356            )
32357        }
32358        __tmp.put_u64_le(self.time_usec);
32359        __tmp.put_f32_le(self.line_length);
32360        __tmp.put_f32_le(self.speed);
32361        __tmp.put_f32_le(self.tension);
32362        __tmp.put_f32_le(self.voltage);
32363        __tmp.put_f32_le(self.current);
32364        __tmp.put_u32_le(self.status.bits() as u32);
32365        __tmp.put_i16_le(self.temperature);
32366        if matches!(version, MavlinkVersion::V2) {
32367            let len = __tmp.len();
32368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32369        } else {
32370            __tmp.len()
32371        }
32372    }
32373}
32374#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32375#[doc = ""]
32376#[doc = "ID: 231"]
32377#[derive(Debug, Clone, PartialEq)]
32378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32380#[cfg_attr(feature = "ts", derive(TS))]
32381#[cfg_attr(feature = "ts", ts(export))]
32382pub struct WIND_COV_DATA {
32383    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32384    pub time_usec: u64,
32385    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32386    pub wind_x: f32,
32387    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32388    pub wind_y: f32,
32389    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32390    pub wind_z: f32,
32391    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32392    pub var_horiz: f32,
32393    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32394    pub var_vert: f32,
32395    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32396    pub wind_alt: f32,
32397    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32398    pub horiz_accuracy: f32,
32399    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32400    pub vert_accuracy: f32,
32401}
32402impl WIND_COV_DATA {
32403    pub const ENCODED_LEN: usize = 40usize;
32404    pub const DEFAULT: Self = Self {
32405        time_usec: 0_u64,
32406        wind_x: 0.0_f32,
32407        wind_y: 0.0_f32,
32408        wind_z: 0.0_f32,
32409        var_horiz: 0.0_f32,
32410        var_vert: 0.0_f32,
32411        wind_alt: 0.0_f32,
32412        horiz_accuracy: 0.0_f32,
32413        vert_accuracy: 0.0_f32,
32414    };
32415    #[cfg(feature = "arbitrary")]
32416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32417        use arbitrary::{Arbitrary, Unstructured};
32418        let mut buf = [0u8; 1024];
32419        rng.fill_bytes(&mut buf);
32420        let mut unstructured = Unstructured::new(&buf);
32421        Self::arbitrary(&mut unstructured).unwrap_or_default()
32422    }
32423}
32424impl Default for WIND_COV_DATA {
32425    fn default() -> Self {
32426        Self::DEFAULT.clone()
32427    }
32428}
32429impl MessageData for WIND_COV_DATA {
32430    type Message = MavMessage;
32431    const ID: u32 = 231u32;
32432    const NAME: &'static str = "WIND_COV";
32433    const EXTRA_CRC: u8 = 105u8;
32434    const ENCODED_LEN: usize = 40usize;
32435    fn deser(
32436        _version: MavlinkVersion,
32437        __input: &[u8],
32438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32439        let avail_len = __input.len();
32440        let mut payload_buf = [0; Self::ENCODED_LEN];
32441        let mut buf = if avail_len < Self::ENCODED_LEN {
32442            payload_buf[0..avail_len].copy_from_slice(__input);
32443            Bytes::new(&payload_buf)
32444        } else {
32445            Bytes::new(__input)
32446        };
32447        let mut __struct = Self::default();
32448        __struct.time_usec = buf.get_u64_le();
32449        __struct.wind_x = buf.get_f32_le();
32450        __struct.wind_y = buf.get_f32_le();
32451        __struct.wind_z = buf.get_f32_le();
32452        __struct.var_horiz = buf.get_f32_le();
32453        __struct.var_vert = buf.get_f32_le();
32454        __struct.wind_alt = buf.get_f32_le();
32455        __struct.horiz_accuracy = buf.get_f32_le();
32456        __struct.vert_accuracy = buf.get_f32_le();
32457        Ok(__struct)
32458    }
32459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32460        let mut __tmp = BytesMut::new(bytes);
32461        #[allow(clippy::absurd_extreme_comparisons)]
32462        #[allow(unused_comparisons)]
32463        if __tmp.remaining() < Self::ENCODED_LEN {
32464            panic!(
32465                "buffer is too small (need {} bytes, but got {})",
32466                Self::ENCODED_LEN,
32467                __tmp.remaining(),
32468            )
32469        }
32470        __tmp.put_u64_le(self.time_usec);
32471        __tmp.put_f32_le(self.wind_x);
32472        __tmp.put_f32_le(self.wind_y);
32473        __tmp.put_f32_le(self.wind_z);
32474        __tmp.put_f32_le(self.var_horiz);
32475        __tmp.put_f32_le(self.var_vert);
32476        __tmp.put_f32_le(self.wind_alt);
32477        __tmp.put_f32_le(self.horiz_accuracy);
32478        __tmp.put_f32_le(self.vert_accuracy);
32479        if matches!(version, MavlinkVersion::V2) {
32480            let len = __tmp.len();
32481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32482        } else {
32483            __tmp.len()
32484        }
32485    }
32486}
32487#[derive(Clone, PartialEq, Debug)]
32488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32489#[cfg_attr(feature = "serde", serde(tag = "type"))]
32490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32491#[cfg_attr(feature = "ts", derive(TS))]
32492#[cfg_attr(feature = "ts", ts(export))]
32493#[repr(u32)]
32494pub enum MavMessage {
32495    #[doc = "Set the vehicle attitude and body angular rates."]
32496    #[doc = ""]
32497    #[doc = "ID: 140"]
32498    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32499    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32500    #[doc = ""]
32501    #[doc = "ID: 375"]
32502    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32503    #[doc = "The location and information of an ADSB vehicle."]
32504    #[doc = ""]
32505    #[doc = "ID: 246"]
32506    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32507    #[doc = "The location and information of an AIS vessel."]
32508    #[doc = ""]
32509    #[doc = "ID: 301"]
32510    AIS_VESSEL(AIS_VESSEL_DATA),
32511    #[doc = "The current system altitude."]
32512    #[doc = ""]
32513    #[doc = "ID: 141"]
32514    ALTITUDE(ALTITUDE_DATA),
32515    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32516    #[doc = ""]
32517    #[doc = "ID: 30"]
32518    ATTITUDE(ATTITUDE_DATA),
32519    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32520    #[doc = ""]
32521    #[doc = "ID: 31"]
32522    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32523    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32524    #[doc = ""]
32525    #[doc = "ID: 61"]
32526    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32527    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32528    #[doc = ""]
32529    #[doc = "ID: 83"]
32530    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32531    #[doc = "Motion capture attitude and position."]
32532    #[doc = ""]
32533    #[doc = "ID: 138"]
32534    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32535    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32536    #[doc = ""]
32537    #[doc = "ID: 7"]
32538    AUTH_KEY(AUTH_KEY_DATA),
32539    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32540    #[doc = ""]
32541    #[doc = "ID: 286"]
32542    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32543    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32544    #[doc = ""]
32545    #[doc = "ID: 148"]
32546    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32547    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32548    #[doc = ""]
32549    #[doc = "ID: 435"]
32550    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32551    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32552    #[doc = ""]
32553    #[doc = "ID: 437"]
32554    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32555    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32556    #[doc = ""]
32557    #[doc = "ID: 372"]
32558    BATTERY_INFO(BATTERY_INFO_DATA),
32559    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32560    #[doc = ""]
32561    #[doc = "ID: 147"]
32562    BATTERY_STATUS(BATTERY_STATUS_DATA),
32563    #[doc = "Report button state change."]
32564    #[doc = ""]
32565    #[doc = "ID: 257"]
32566    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32567    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32568    #[doc = ""]
32569    #[doc = "ID: 262"]
32570    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32571    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32572    #[doc = ""]
32573    #[doc = "ID: 271"]
32574    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32575    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32576    #[doc = ""]
32577    #[doc = "ID: 263"]
32578    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32579    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32580    #[doc = ""]
32581    #[doc = "ID: 259"]
32582    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32583    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32584    #[doc = ""]
32585    #[doc = "ID: 260"]
32586    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32587    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32588    #[doc = ""]
32589    #[doc = "ID: 277"]
32590    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32591    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32592    #[doc = ""]
32593    #[doc = "ID: 276"]
32594    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32595    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32596    #[doc = ""]
32597    #[doc = "ID: 275"]
32598    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32599    #[doc = "Camera-IMU triggering and synchronisation message."]
32600    #[doc = ""]
32601    #[doc = "ID: 112"]
32602    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32603    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32604    #[doc = ""]
32605    #[doc = "ID: 387"]
32606    CANFD_FRAME(CANFD_FRAME_DATA),
32607    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32608    #[doc = ""]
32609    #[doc = "ID: 388"]
32610    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32611    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32612    #[doc = ""]
32613    #[doc = "ID: 386"]
32614    CAN_FRAME(CAN_FRAME_DATA),
32615    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32616    #[doc = ""]
32617    #[doc = "ID: 336"]
32618    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32619    #[doc = "Report current used cellular network status."]
32620    #[doc = ""]
32621    #[doc = "ID: 334"]
32622    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32623    #[doc = "Request to control this MAV."]
32624    #[doc = ""]
32625    #[doc = "ID: 5"]
32626    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32627    #[doc = "Accept / deny control of this MAV."]
32628    #[doc = ""]
32629    #[doc = "ID: 6"]
32630    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32631    #[doc = "Information about a potential collision."]
32632    #[doc = ""]
32633    #[doc = "ID: 247"]
32634    COLLISION(COLLISION_DATA),
32635    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32636    #[doc = ""]
32637    #[doc = "ID: 77"]
32638    COMMAND_ACK(COMMAND_ACK_DATA),
32639    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32640    #[doc = ""]
32641    #[doc = "ID: 80"]
32642    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32643    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32644    #[doc = ""]
32645    #[doc = "ID: 75"]
32646    COMMAND_INT(COMMAND_INT_DATA),
32647    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32648    #[doc = ""]
32649    #[doc = "ID: 76"]
32650    COMMAND_LONG(COMMAND_LONG_DATA),
32651    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32652    #[doc = ""]
32653    #[doc = "ID: 395"]
32654    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32655    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32656    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32657    #[doc = ""]
32658    #[doc = "ID: 396"]
32659    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32660    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32661    #[doc = ""]
32662    #[doc = "ID: 397"]
32663    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32664    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32665    #[doc = ""]
32666    #[doc = "ID: 146"]
32667    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32668    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32669    #[doc = ""]
32670    #[doc = "ID: 411"]
32671    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32672    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32673    #[doc = ""]
32674    #[doc = "ID: 436"]
32675    CURRENT_MODE(CURRENT_MODE_DATA),
32676    #[doc = "Data stream status information."]
32677    #[doc = ""]
32678    #[doc = "ID: 67"]
32679    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32680    DATA_STREAM(DATA_STREAM_DATA),
32681    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32682    #[doc = ""]
32683    #[doc = "ID: 130"]
32684    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32685    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32686    #[doc = ""]
32687    #[doc = "ID: 254"]
32688    DEBUG(DEBUG_DATA),
32689    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32690    #[doc = ""]
32691    #[doc = "ID: 350"]
32692    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32693    #[doc = "To debug something using a named 3D vector."]
32694    #[doc = ""]
32695    #[doc = "ID: 250"]
32696    DEBUG_VECT(DEBUG_VECT_DATA),
32697    #[doc = "Distance sensor information for an onboard rangefinder."]
32698    #[doc = ""]
32699    #[doc = "ID: 132"]
32700    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32701    #[doc = "EFI status output."]
32702    #[doc = ""]
32703    #[doc = "ID: 225"]
32704    EFI_STATUS(EFI_STATUS_DATA),
32705    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32706    #[doc = ""]
32707    #[doc = "ID: 131"]
32708    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32709    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32710    #[doc = ""]
32711    #[doc = "ID: 290"]
32712    ESC_INFO(ESC_INFO_DATA),
32713    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32714    #[doc = ""]
32715    #[doc = "ID: 291"]
32716    ESC_STATUS(ESC_STATUS_DATA),
32717    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32718    #[doc = ""]
32719    #[doc = "ID: 230"]
32720    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32721    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32722    #[doc = ""]
32723    #[doc = "ID: 410"]
32724    EVENT(EVENT_DATA),
32725    #[doc = "Provides state for additional features."]
32726    #[doc = ""]
32727    #[doc = "ID: 245"]
32728    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32729    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32730    #[doc = ""]
32731    #[doc = "ID: 162"]
32732    FENCE_STATUS(FENCE_STATUS_DATA),
32733    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32734    #[doc = ""]
32735    #[doc = "ID: 110"]
32736    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32737    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32738    #[doc = ""]
32739    #[doc = "ID: 264"]
32740    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32741    #[doc = "Current motion information from a designated system."]
32742    #[doc = ""]
32743    #[doc = "ID: 144"]
32744    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32745    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32746    #[doc = ""]
32747    #[doc = "ID: 371"]
32748    FUEL_STATUS(FUEL_STATUS_DATA),
32749    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32750    #[doc = ""]
32751    #[doc = "ID: 373"]
32752    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32753    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32754    #[doc = ""]
32755    #[doc = "ID: 285"]
32756    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32757    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32758    #[doc = ""]
32759    #[doc = "ID: 283"]
32760    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32761    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32762    #[doc = ""]
32763    #[doc = "ID: 284"]
32764    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32765    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32766    #[doc = ""]
32767    #[doc = "ID: 280"]
32768    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32769    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32770    #[doc = ""]
32771    #[doc = "ID: 282"]
32772    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32773    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32774    #[doc = ""]
32775    #[doc = "ID: 288"]
32776    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32777    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32778    #[doc = ""]
32779    #[doc = "ID: 287"]
32780    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32781    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32782    #[doc = ""]
32783    #[doc = "ID: 281"]
32784    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32785    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32786    #[doc = ""]
32787    #[doc = "ID: 33"]
32788    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32789    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32790    #[doc = ""]
32791    #[doc = "ID: 63"]
32792    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32793    #[doc = "Global position/attitude estimate from a vision source."]
32794    #[doc = ""]
32795    #[doc = "ID: 101"]
32796    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32797    #[doc = "Second GPS data."]
32798    #[doc = ""]
32799    #[doc = "ID: 124"]
32800    GPS2_RAW(GPS2_RAW_DATA),
32801    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32802    #[doc = ""]
32803    #[doc = "ID: 128"]
32804    GPS2_RTK(GPS2_RTK_DATA),
32805    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32806    #[doc = ""]
32807    #[doc = "ID: 49"]
32808    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32809    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32810    #[doc = ""]
32811    #[doc = "ID: 123"]
32812    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32813    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32814    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32815    #[doc = ""]
32816    #[doc = "ID: 232"]
32817    GPS_INPUT(GPS_INPUT_DATA),
32818    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32819    #[doc = ""]
32820    #[doc = "ID: 24"]
32821    GPS_RAW_INT(GPS_RAW_INT_DATA),
32822    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32823    #[doc = ""]
32824    #[doc = "ID: 233"]
32825    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32826    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32827    #[doc = ""]
32828    #[doc = "ID: 127"]
32829    GPS_RTK(GPS_RTK_DATA),
32830    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32831    #[doc = ""]
32832    #[doc = "ID: 25"]
32833    GPS_STATUS(GPS_STATUS_DATA),
32834    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32835    #[doc = ""]
32836    #[doc = "ID: 0"]
32837    HEARTBEAT(HEARTBEAT_DATA),
32838    #[doc = "The IMU readings in SI units in NED body frame."]
32839    #[doc = ""]
32840    #[doc = "ID: 105"]
32841    HIGHRES_IMU(HIGHRES_IMU_DATA),
32842    #[doc = "Message appropriate for high latency connections like Iridium."]
32843    #[doc = ""]
32844    #[doc = "ID: 234"]
32845    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32846    HIGH_LATENCY(HIGH_LATENCY_DATA),
32847    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32848    #[doc = ""]
32849    #[doc = "ID: 235"]
32850    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32851    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32852    #[doc = ""]
32853    #[doc = "ID: 93"]
32854    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32855    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32856    #[doc = ""]
32857    #[doc = "ID: 91"]
32858    HIL_CONTROLS(HIL_CONTROLS_DATA),
32859    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32860    #[doc = ""]
32861    #[doc = "ID: 113"]
32862    HIL_GPS(HIL_GPS_DATA),
32863    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32864    #[doc = ""]
32865    #[doc = "ID: 114"]
32866    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32867    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32868    #[doc = ""]
32869    #[doc = "ID: 92"]
32870    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32871    #[doc = "The IMU readings in SI units in NED body frame."]
32872    #[doc = ""]
32873    #[doc = "ID: 107"]
32874    HIL_SENSOR(HIL_SENSOR_DATA),
32875    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32876    #[doc = ""]
32877    #[doc = "ID: 90"]
32878    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32879    HIL_STATE(HIL_STATE_DATA),
32880    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32881    #[doc = ""]
32882    #[doc = "ID: 115"]
32883    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32884    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32885    #[doc = ""]
32886    #[doc = "ID: 242"]
32887    HOME_POSITION(HOME_POSITION_DATA),
32888    #[doc = "Temperature and humidity from hygrometer."]
32889    #[doc = ""]
32890    #[doc = "ID: 12920"]
32891    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32892    #[doc = "Illuminator status."]
32893    #[doc = ""]
32894    #[doc = "ID: 440"]
32895    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32896    #[doc = "Status of the Iridium SBD link."]
32897    #[doc = ""]
32898    #[doc = "ID: 335"]
32899    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32900    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32901    #[doc = ""]
32902    #[doc = "ID: 149"]
32903    LANDING_TARGET(LANDING_TARGET_DATA),
32904    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32905    #[doc = ""]
32906    #[doc = "ID: 8"]
32907    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32908    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32909    #[doc = ""]
32910    #[doc = "ID: 32"]
32911    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32912    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32913    #[doc = ""]
32914    #[doc = "ID: 64"]
32915    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32916    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32917    #[doc = ""]
32918    #[doc = "ID: 89"]
32919    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32920    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32921    #[doc = ""]
32922    #[doc = "ID: 268"]
32923    LOGGING_ACK(LOGGING_ACK_DATA),
32924    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32925    #[doc = ""]
32926    #[doc = "ID: 266"]
32927    LOGGING_DATA(LOGGING_DATA_DATA),
32928    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32929    #[doc = ""]
32930    #[doc = "ID: 267"]
32931    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32932    #[doc = "Reply to LOG_REQUEST_DATA."]
32933    #[doc = ""]
32934    #[doc = "ID: 120"]
32935    LOG_DATA(LOG_DATA_DATA),
32936    #[doc = "Reply to LOG_REQUEST_LIST."]
32937    #[doc = ""]
32938    #[doc = "ID: 118"]
32939    LOG_ENTRY(LOG_ENTRY_DATA),
32940    #[doc = "Erase all logs."]
32941    #[doc = ""]
32942    #[doc = "ID: 121"]
32943    LOG_ERASE(LOG_ERASE_DATA),
32944    #[doc = "Request a chunk of a log."]
32945    #[doc = ""]
32946    #[doc = "ID: 119"]
32947    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32948    #[doc = "Stop log transfer and resume normal logging."]
32949    #[doc = ""]
32950    #[doc = "ID: 122"]
32951    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32952    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32953    #[doc = ""]
32954    #[doc = "ID: 117"]
32955    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32956    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32957    #[doc = ""]
32958    #[doc = "ID: 192"]
32959    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32960    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32961    #[doc = ""]
32962    #[doc = "ID: 69"]
32963    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32964    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32965    #[doc = ""]
32966    #[doc = "ID: 81"]
32967    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32968    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32969    #[doc = ""]
32970    #[doc = "ID: 249"]
32971    MEMORY_VECT(MEMORY_VECT_DATA),
32972    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32973    #[doc = ""]
32974    #[doc = "ID: 244"]
32975    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32976    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32977    #[doc = ""]
32978    #[doc = "ID: 47"]
32979    MISSION_ACK(MISSION_ACK_DATA),
32980    #[doc = "Delete all mission items at once."]
32981    #[doc = ""]
32982    #[doc = "ID: 45"]
32983    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32984    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32985    #[doc = ""]
32986    #[doc = "ID: 44"]
32987    MISSION_COUNT(MISSION_COUNT_DATA),
32988    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32989    #[doc = ""]
32990    #[doc = "ID: 42"]
32991    MISSION_CURRENT(MISSION_CURRENT_DATA),
32992    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32993    #[doc = ""]
32994    #[doc = "ID: 39"]
32995    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32996    MISSION_ITEM(MISSION_ITEM_DATA),
32997    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32998    #[doc = ""]
32999    #[doc = "ID: 73"]
33000    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33001    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33002    #[doc = ""]
33003    #[doc = "ID: 46"]
33004    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33005    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33006    #[doc = ""]
33007    #[doc = "ID: 40"]
33008    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33009    MISSION_REQUEST(MISSION_REQUEST_DATA),
33010    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33011    #[doc = ""]
33012    #[doc = "ID: 51"]
33013    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33014    #[doc = "Request the overall list of mission items from the system/component."]
33015    #[doc = ""]
33016    #[doc = "ID: 43"]
33017    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33018    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33019    #[doc = ""]
33020    #[doc = "ID: 37"]
33021    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33022    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33023    #[doc = ""]
33024    #[doc = "ID: 41"]
33025    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33026    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33027    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33028    #[doc = ""]
33029    #[doc = "ID: 38"]
33030    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33031    #[doc = "Orientation of a mount."]
33032    #[doc = ""]
33033    #[doc = "ID: 265"]
33034    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33035    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33036    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33037    #[doc = ""]
33038    #[doc = "ID: 251"]
33039    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33040    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33041    #[doc = ""]
33042    #[doc = "ID: 252"]
33043    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33044    #[doc = "The state of the navigation and position controller."]
33045    #[doc = ""]
33046    #[doc = "ID: 62"]
33047    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33048    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33049    #[doc = ""]
33050    #[doc = "ID: 330"]
33051    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33052    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33053    #[doc = ""]
33054    #[doc = "ID: 331"]
33055    ODOMETRY(ODOMETRY_DATA),
33056    #[doc = "Hardware status sent by an onboard computer."]
33057    #[doc = ""]
33058    #[doc = "ID: 390"]
33059    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33060    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33061    #[doc = ""]
33062    #[doc = "ID: 12918"]
33063    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33064    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33065    #[doc = ""]
33066    #[doc = "ID: 12902"]
33067    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33068    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33069    #[doc = ""]
33070    #[doc = "ID: 12900"]
33071    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33072    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33073    #[doc = ""]
33074    #[doc = "ID: 12901"]
33075    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33076    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33077    #[doc = ""]
33078    #[doc = "ID: 12915"]
33079    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33080    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33081    #[doc = ""]
33082    #[doc = "ID: 12905"]
33083    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33084    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33085    #[doc = ""]
33086    #[doc = "ID: 12903"]
33087    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33088    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33089    #[doc = ""]
33090    #[doc = "ID: 12904"]
33091    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33092    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33093    #[doc = ""]
33094    #[doc = "ID: 12919"]
33095    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33096    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33097    #[doc = ""]
33098    #[doc = "ID: 100"]
33099    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33100    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33101    #[doc = ""]
33102    #[doc = "ID: 106"]
33103    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33104    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33105    #[doc = ""]
33106    #[doc = "ID: 360"]
33107    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33108    #[doc = "Response from a PARAM_EXT_SET message."]
33109    #[doc = ""]
33110    #[doc = "ID: 324"]
33111    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33112    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33113    #[doc = ""]
33114    #[doc = "ID: 321"]
33115    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33116    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33117    #[doc = ""]
33118    #[doc = "ID: 320"]
33119    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33120    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33121    #[doc = ""]
33122    #[doc = "ID: 323"]
33123    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33124    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33125    #[doc = ""]
33126    #[doc = "ID: 322"]
33127    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33128    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33129    #[doc = ""]
33130    #[doc = "ID: 50"]
33131    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33132    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33133    #[doc = ""]
33134    #[doc = "ID: 21"]
33135    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33136    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33137    #[doc = ""]
33138    #[doc = "ID: 20"]
33139    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33140    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33141    #[doc = ""]
33142    #[doc = "ID: 23"]
33143    PARAM_SET(PARAM_SET_DATA),
33144    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33145    #[doc = ""]
33146    #[doc = "ID: 22"]
33147    PARAM_VALUE(PARAM_VALUE_DATA),
33148    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33149    #[doc = ""]
33150    #[doc = "ID: 4"]
33151    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33152    PING(PING_DATA),
33153    #[doc = "Control vehicle tone generation (buzzer)."]
33154    #[doc = ""]
33155    #[doc = "ID: 258"]
33156    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33157    PLAY_TUNE(PLAY_TUNE_DATA),
33158    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33159    #[doc = ""]
33160    #[doc = "ID: 400"]
33161    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33162    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33163    #[doc = ""]
33164    #[doc = "ID: 87"]
33165    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33166    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33167    #[doc = ""]
33168    #[doc = "ID: 85"]
33169    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33170    #[doc = "Power supply status."]
33171    #[doc = ""]
33172    #[doc = "ID: 125"]
33173    POWER_STATUS(POWER_STATUS_DATA),
33174    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33175    #[doc = ""]
33176    #[doc = "ID: 300"]
33177    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33178    #[doc = "Status generated by radio and injected into MAVLink stream."]
33179    #[doc = ""]
33180    #[doc = "ID: 109"]
33181    RADIO_STATUS(RADIO_STATUS_DATA),
33182    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33183    #[doc = ""]
33184    #[doc = "ID: 27"]
33185    RAW_IMU(RAW_IMU_DATA),
33186    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33187    #[doc = ""]
33188    #[doc = "ID: 28"]
33189    RAW_PRESSURE(RAW_PRESSURE_DATA),
33190    #[doc = "RPM sensor data message."]
33191    #[doc = ""]
33192    #[doc = "ID: 339"]
33193    RAW_RPM(RAW_RPM_DATA),
33194    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33195    #[doc = ""]
33196    #[doc = "ID: 65"]
33197    RC_CHANNELS(RC_CHANNELS_DATA),
33198    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33199    #[doc = ""]
33200    #[doc = "ID: 70"]
33201    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33202    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33203    #[doc = ""]
33204    #[doc = "ID: 35"]
33205    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33206    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33207    #[doc = ""]
33208    #[doc = "ID: 34"]
33209    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33210    #[doc = "Request a data stream."]
33211    #[doc = ""]
33212    #[doc = "ID: 66"]
33213    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33214    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33215    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33216    #[doc = ""]
33217    #[doc = "ID: 412"]
33218    REQUEST_EVENT(REQUEST_EVENT_DATA),
33219    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33220    #[doc = ""]
33221    #[doc = "ID: 142"]
33222    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33223    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33224    #[doc = ""]
33225    #[doc = "ID: 413"]
33226    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33227    #[doc = "Read out the safety zone the MAV currently assumes."]
33228    #[doc = ""]
33229    #[doc = "ID: 55"]
33230    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33231    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33232    #[doc = ""]
33233    #[doc = "ID: 54"]
33234    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33235    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33236    #[doc = ""]
33237    #[doc = "ID: 26"]
33238    SCALED_IMU(SCALED_IMU_DATA),
33239    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33240    #[doc = ""]
33241    #[doc = "ID: 116"]
33242    SCALED_IMU2(SCALED_IMU2_DATA),
33243    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33244    #[doc = ""]
33245    #[doc = "ID: 129"]
33246    SCALED_IMU3(SCALED_IMU3_DATA),
33247    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33248    #[doc = ""]
33249    #[doc = "ID: 29"]
33250    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33251    #[doc = "Barometer readings for 2nd barometer."]
33252    #[doc = ""]
33253    #[doc = "ID: 137"]
33254    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33255    #[doc = "Barometer readings for 3rd barometer."]
33256    #[doc = ""]
33257    #[doc = "ID: 143"]
33258    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33259    #[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
33260    #[doc = ""]
33261    #[doc = "ID: 183"]
33262    SCRIPT_COUNT(SCRIPT_COUNT_DATA),
33263    #[doc = "This message informs about the currently active SCRIPT."]
33264    #[doc = ""]
33265    #[doc = "ID: 184"]
33266    SCRIPT_CURRENT(SCRIPT_CURRENT_DATA),
33267    #[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
33268    #[doc = ""]
33269    #[doc = "ID: 180"]
33270    SCRIPT_ITEM(SCRIPT_ITEM_DATA),
33271    #[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
33272    #[doc = ""]
33273    #[doc = "ID: 181"]
33274    SCRIPT_REQUEST(SCRIPT_REQUEST_DATA),
33275    #[doc = "Request the overall list of mission items from the system/component."]
33276    #[doc = ""]
33277    #[doc = "ID: 182"]
33278    SCRIPT_REQUEST_LIST(SCRIPT_REQUEST_LIST_DATA),
33279    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33280    #[doc = ""]
33281    #[doc = "ID: 126"]
33282    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33283    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33284    #[doc = ""]
33285    #[doc = "ID: 36"]
33286    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33287    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33288    #[doc = ""]
33289    #[doc = "ID: 256"]
33290    SETUP_SIGNING(SETUP_SIGNING_DATA),
33291    #[doc = "Set the vehicle attitude and body angular rates."]
33292    #[doc = ""]
33293    #[doc = "ID: 139"]
33294    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33295    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33296    #[doc = ""]
33297    #[doc = "ID: 82"]
33298    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33299    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33300    #[doc = ""]
33301    #[doc = "ID: 48"]
33302    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33303    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33304    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33305    #[doc = ""]
33306    #[doc = "ID: 243"]
33307    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33308    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33309    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33310    #[doc = ""]
33311    #[doc = "ID: 11"]
33312    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33313    SET_MODE(SET_MODE_DATA),
33314    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33315    #[doc = ""]
33316    #[doc = "ID: 86"]
33317    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33318    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33319    #[doc = ""]
33320    #[doc = "ID: 84"]
33321    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33322    #[doc = "Status of simulation environment, if used."]
33323    #[doc = ""]
33324    #[doc = "ID: 108"]
33325    SIM_STATE(SIM_STATE_DATA),
33326    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33327    #[doc = ""]
33328    #[doc = "ID: 370"]
33329    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33330    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33331    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33332    #[doc = ""]
33333    #[doc = "ID: 253"]
33334    STATUSTEXT(STATUSTEXT_DATA),
33335    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33336    #[doc = ""]
33337    #[doc = "ID: 261"]
33338    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33339    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33340    #[doc = ""]
33341    #[doc = "ID: 401"]
33342    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33343    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33344    #[doc = ""]
33345    #[doc = "ID: 2"]
33346    SYSTEM_TIME(SYSTEM_TIME_DATA),
33347    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33348    #[doc = ""]
33349    #[doc = "ID: 1"]
33350    SYS_STATUS(SYS_STATUS_DATA),
33351    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33352    #[doc = ""]
33353    #[doc = "ID: 135"]
33354    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33355    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33356    #[doc = ""]
33357    #[doc = "ID: 134"]
33358    TERRAIN_DATA(TERRAIN_DATA_DATA),
33359    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33360    #[doc = ""]
33361    #[doc = "ID: 136"]
33362    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33363    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33364    #[doc = ""]
33365    #[doc = "ID: 133"]
33366    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33367    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33368    #[doc = ""]
33369    #[doc = "ID: 111"]
33370    TIMESYNC(TIMESYNC_DATA),
33371    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33372    #[doc = ""]
33373    #[doc = "ID: 380"]
33374    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33375    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33376    #[doc = ""]
33377    #[doc = "ID: 333"]
33378    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33379    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33380    #[doc = ""]
33381    #[doc = "ID: 332"]
33382    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33383    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33384    #[doc = ""]
33385    #[doc = "ID: 385"]
33386    TUNNEL(TUNNEL_DATA),
33387    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33388    #[doc = ""]
33389    #[doc = "ID: 311"]
33390    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33391    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33392    #[doc = ""]
33393    #[doc = "ID: 310"]
33394    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33395    #[doc = "The global position resulting from GPS and sensor fusion."]
33396    #[doc = ""]
33397    #[doc = "ID: 340"]
33398    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33399    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33400    #[doc = ""]
33401    #[doc = "ID: 248"]
33402    V2_EXTENSION(V2_EXTENSION_DATA),
33403    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33404    #[doc = ""]
33405    #[doc = "ID: 74"]
33406    VFR_HUD(VFR_HUD_DATA),
33407    #[doc = "Vibration levels and accelerometer clipping."]
33408    #[doc = ""]
33409    #[doc = "ID: 241"]
33410    VIBRATION(VIBRATION_DATA),
33411    #[doc = "Global position estimate from a Vicon motion system source."]
33412    #[doc = ""]
33413    #[doc = "ID: 104"]
33414    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33415    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33416    #[doc = ""]
33417    #[doc = "ID: 269"]
33418    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33419    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33420    #[doc = ""]
33421    #[doc = "ID: 270"]
33422    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33423    #[doc = "Local position/attitude estimate from a vision source."]
33424    #[doc = ""]
33425    #[doc = "ID: 102"]
33426    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33427    #[doc = "Speed estimate from a vision source."]
33428    #[doc = ""]
33429    #[doc = "ID: 103"]
33430    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33431    #[doc = "Cumulative distance traveled for each reported wheel."]
33432    #[doc = ""]
33433    #[doc = "ID: 9000"]
33434    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33435    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33436    #[doc = ""]
33437    #[doc = "ID: 299"]
33438    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33439    #[doc = "Winch status."]
33440    #[doc = ""]
33441    #[doc = "ID: 9005"]
33442    WINCH_STATUS(WINCH_STATUS_DATA),
33443    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33444    #[doc = ""]
33445    #[doc = "ID: 231"]
33446    WIND_COV(WIND_COV_DATA),
33447}
33448impl MavMessage {
33449    pub const fn all_ids() -> &'static [u32] {
33450        &[
33451            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33452            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33453            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33454            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33455            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33456            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33457            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33458            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33459            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33460            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33461            148u32, 149u32, 162u32, 180u32, 181u32, 182u32, 183u32, 184u32, 192u32, 225u32, 230u32,
33462            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
33463            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
33464            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
33465            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
33466            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
33467            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
33468            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
33469            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
33470            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
33471            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33472        ]
33473    }
33474}
33475impl Message for MavMessage {
33476    fn parse(
33477        version: MavlinkVersion,
33478        id: u32,
33479        payload: &[u8],
33480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33481        match id {
33482            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33483                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33484                    .map(Self::ACTUATOR_CONTROL_TARGET)
33485            }
33486            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33487                .map(Self::ACTUATOR_OUTPUT_STATUS),
33488            ADSB_VEHICLE_DATA::ID => {
33489                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33490            }
33491            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33492            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33493            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33494            ATTITUDE_QUATERNION_DATA::ID => {
33495                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33496            }
33497            ATTITUDE_QUATERNION_COV_DATA::ID => {
33498                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33499                    .map(Self::ATTITUDE_QUATERNION_COV)
33500            }
33501            ATTITUDE_TARGET_DATA::ID => {
33502                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33503            }
33504            ATT_POS_MOCAP_DATA::ID => {
33505                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33506            }
33507            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33508            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33509                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33510                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33511            }
33512            AUTOPILOT_VERSION_DATA::ID => {
33513                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33514            }
33515            AVAILABLE_MODES_DATA::ID => {
33516                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33517            }
33518            AVAILABLE_MODES_MONITOR_DATA::ID => {
33519                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33520                    .map(Self::AVAILABLE_MODES_MONITOR)
33521            }
33522            BATTERY_INFO_DATA::ID => {
33523                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33524            }
33525            BATTERY_STATUS_DATA::ID => {
33526                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33527            }
33528            BUTTON_CHANGE_DATA::ID => {
33529                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33530            }
33531            CAMERA_CAPTURE_STATUS_DATA::ID => {
33532                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33533            }
33534            CAMERA_FOV_STATUS_DATA::ID => {
33535                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33536            }
33537            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33538                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33539            }
33540            CAMERA_INFORMATION_DATA::ID => {
33541                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33542            }
33543            CAMERA_SETTINGS_DATA::ID => {
33544                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33545            }
33546            CAMERA_THERMAL_RANGE_DATA::ID => {
33547                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33548            }
33549            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33550                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33551                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33552            }
33553            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33554                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33555                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33556            }
33557            CAMERA_TRIGGER_DATA::ID => {
33558                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33559            }
33560            CANFD_FRAME_DATA::ID => {
33561                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33562            }
33563            CAN_FILTER_MODIFY_DATA::ID => {
33564                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33565            }
33566            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33567            CELLULAR_CONFIG_DATA::ID => {
33568                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33569            }
33570            CELLULAR_STATUS_DATA::ID => {
33571                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33572            }
33573            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33574                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33575                    .map(Self::CHANGE_OPERATOR_CONTROL)
33576            }
33577            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33578                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33579                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33580            }
33581            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33582            COMMAND_ACK_DATA::ID => {
33583                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33584            }
33585            COMMAND_CANCEL_DATA::ID => {
33586                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33587            }
33588            COMMAND_INT_DATA::ID => {
33589                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33590            }
33591            COMMAND_LONG_DATA::ID => {
33592                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33593            }
33594            COMPONENT_INFORMATION_DATA::ID => {
33595                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33596            }
33597            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33598                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33599                    .map(Self::COMPONENT_INFORMATION_BASIC)
33600            }
33601            COMPONENT_METADATA_DATA::ID => {
33602                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33603            }
33604            CONTROL_SYSTEM_STATE_DATA::ID => {
33605                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33606            }
33607            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33608                .map(Self::CURRENT_EVENT_SEQUENCE),
33609            CURRENT_MODE_DATA::ID => {
33610                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33611            }
33612            DATA_STREAM_DATA::ID => {
33613                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33614            }
33615            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33616                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33617                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33618            }
33619            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33620            DEBUG_FLOAT_ARRAY_DATA::ID => {
33621                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33622            }
33623            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33624            DISTANCE_SENSOR_DATA::ID => {
33625                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33626            }
33627            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33628            ENCAPSULATED_DATA_DATA::ID => {
33629                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33630            }
33631            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33632            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33633            ESTIMATOR_STATUS_DATA::ID => {
33634                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33635            }
33636            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33637            EXTENDED_SYS_STATE_DATA::ID => {
33638                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33639            }
33640            FENCE_STATUS_DATA::ID => {
33641                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33642            }
33643            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33644                .map(Self::FILE_TRANSFER_PROTOCOL),
33645            FLIGHT_INFORMATION_DATA::ID => {
33646                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33647            }
33648            FOLLOW_TARGET_DATA::ID => {
33649                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33650            }
33651            FUEL_STATUS_DATA::ID => {
33652                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33653            }
33654            GENERATOR_STATUS_DATA::ID => {
33655                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33656            }
33657            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33658                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33659                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33660            }
33661            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33662                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33663                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33664            }
33665            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33666                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33667                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33668            }
33669            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33670                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33671                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33672            }
33673            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33674                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33675                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33676            }
33677            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33678                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33679                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33680            }
33681            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33682                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33683                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33684            }
33685            GIMBAL_MANAGER_STATUS_DATA::ID => {
33686                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33687            }
33688            GLOBAL_POSITION_INT_DATA::ID => {
33689                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33690            }
33691            GLOBAL_POSITION_INT_COV_DATA::ID => {
33692                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33693                    .map(Self::GLOBAL_POSITION_INT_COV)
33694            }
33695            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33696                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33697                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33698            }
33699            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33700            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33701            GPS_GLOBAL_ORIGIN_DATA::ID => {
33702                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33703            }
33704            GPS_INJECT_DATA_DATA::ID => {
33705                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33706            }
33707            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33708            GPS_RAW_INT_DATA::ID => {
33709                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33710            }
33711            GPS_RTCM_DATA_DATA::ID => {
33712                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33713            }
33714            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33715            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33716            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33717            HIGHRES_IMU_DATA::ID => {
33718                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33719            }
33720            HIGH_LATENCY_DATA::ID => {
33721                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33722            }
33723            HIGH_LATENCY2_DATA::ID => {
33724                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33725            }
33726            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33727                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33728            }
33729            HIL_CONTROLS_DATA::ID => {
33730                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33731            }
33732            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33733            HIL_OPTICAL_FLOW_DATA::ID => {
33734                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33735            }
33736            HIL_RC_INPUTS_RAW_DATA::ID => {
33737                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33738            }
33739            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33740            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33741            HIL_STATE_QUATERNION_DATA::ID => {
33742                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33743            }
33744            HOME_POSITION_DATA::ID => {
33745                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33746            }
33747            HYGROMETER_SENSOR_DATA::ID => {
33748                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33749            }
33750            ILLUMINATOR_STATUS_DATA::ID => {
33751                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33752            }
33753            ISBD_LINK_STATUS_DATA::ID => {
33754                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33755            }
33756            LANDING_TARGET_DATA::ID => {
33757                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33758            }
33759            LINK_NODE_STATUS_DATA::ID => {
33760                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33761            }
33762            LOCAL_POSITION_NED_DATA::ID => {
33763                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33764            }
33765            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33766                .map(Self::LOCAL_POSITION_NED_COV),
33767            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33768                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33769                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33770            }
33771            LOGGING_ACK_DATA::ID => {
33772                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33773            }
33774            LOGGING_DATA_DATA::ID => {
33775                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33776            }
33777            LOGGING_DATA_ACKED_DATA::ID => {
33778                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33779            }
33780            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33781            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33782            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33783            LOG_REQUEST_DATA_DATA::ID => {
33784                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33785            }
33786            LOG_REQUEST_END_DATA::ID => {
33787                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33788            }
33789            LOG_REQUEST_LIST_DATA::ID => {
33790                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33791            }
33792            MAG_CAL_REPORT_DATA::ID => {
33793                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33794            }
33795            MANUAL_CONTROL_DATA::ID => {
33796                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33797            }
33798            MANUAL_SETPOINT_DATA::ID => {
33799                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33800            }
33801            MEMORY_VECT_DATA::ID => {
33802                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33803            }
33804            MESSAGE_INTERVAL_DATA::ID => {
33805                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33806            }
33807            MISSION_ACK_DATA::ID => {
33808                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33809            }
33810            MISSION_CLEAR_ALL_DATA::ID => {
33811                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33812            }
33813            MISSION_COUNT_DATA::ID => {
33814                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33815            }
33816            MISSION_CURRENT_DATA::ID => {
33817                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33818            }
33819            MISSION_ITEM_DATA::ID => {
33820                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33821            }
33822            MISSION_ITEM_INT_DATA::ID => {
33823                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33824            }
33825            MISSION_ITEM_REACHED_DATA::ID => {
33826                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33827            }
33828            MISSION_REQUEST_DATA::ID => {
33829                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33830            }
33831            MISSION_REQUEST_INT_DATA::ID => {
33832                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33833            }
33834            MISSION_REQUEST_LIST_DATA::ID => {
33835                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33836            }
33837            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33838                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33839                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33840            }
33841            MISSION_SET_CURRENT_DATA::ID => {
33842                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33843            }
33844            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33845                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33846                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33847            }
33848            MOUNT_ORIENTATION_DATA::ID => {
33849                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33850            }
33851            NAMED_VALUE_FLOAT_DATA::ID => {
33852                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33853            }
33854            NAMED_VALUE_INT_DATA::ID => {
33855                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33856            }
33857            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33858                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33859            }
33860            OBSTACLE_DISTANCE_DATA::ID => {
33861                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33862            }
33863            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33864            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33865                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33866                    .map(Self::ONBOARD_COMPUTER_STATUS)
33867            }
33868            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33869                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33870                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33871            }
33872            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33873                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33874                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33875            }
33876            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33877                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33878            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33879                .map(Self::OPEN_DRONE_ID_LOCATION),
33880            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33881                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33882                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33883            }
33884            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33885                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33886                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33887            }
33888            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33889                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33890            }
33891            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33892                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33893            }
33894            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33895                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33896                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33897            }
33898            OPTICAL_FLOW_DATA::ID => {
33899                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33900            }
33901            OPTICAL_FLOW_RAD_DATA::ID => {
33902                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33903            }
33904            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33905                .map(Self::ORBIT_EXECUTION_STATUS),
33906            PARAM_EXT_ACK_DATA::ID => {
33907                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33908            }
33909            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33910                .map(Self::PARAM_EXT_REQUEST_LIST),
33911            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33912                .map(Self::PARAM_EXT_REQUEST_READ),
33913            PARAM_EXT_SET_DATA::ID => {
33914                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33915            }
33916            PARAM_EXT_VALUE_DATA::ID => {
33917                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33918            }
33919            PARAM_MAP_RC_DATA::ID => {
33920                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33921            }
33922            PARAM_REQUEST_LIST_DATA::ID => {
33923                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33924            }
33925            PARAM_REQUEST_READ_DATA::ID => {
33926                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33927            }
33928            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33929            PARAM_VALUE_DATA::ID => {
33930                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33931            }
33932            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33933            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33934            PLAY_TUNE_V2_DATA::ID => {
33935                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33936            }
33937            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
33938                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
33939                    .map(Self::POSITION_TARGET_GLOBAL_INT)
33940            }
33941            POSITION_TARGET_LOCAL_NED_DATA::ID => {
33942                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
33943                    .map(Self::POSITION_TARGET_LOCAL_NED)
33944            }
33945            POWER_STATUS_DATA::ID => {
33946                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
33947            }
33948            PROTOCOL_VERSION_DATA::ID => {
33949                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
33950            }
33951            RADIO_STATUS_DATA::ID => {
33952                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
33953            }
33954            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
33955            RAW_PRESSURE_DATA::ID => {
33956                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
33957            }
33958            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
33959            RC_CHANNELS_DATA::ID => {
33960                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
33961            }
33962            RC_CHANNELS_OVERRIDE_DATA::ID => {
33963                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
33964            }
33965            RC_CHANNELS_RAW_DATA::ID => {
33966                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
33967            }
33968            RC_CHANNELS_SCALED_DATA::ID => {
33969                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
33970            }
33971            REQUEST_DATA_STREAM_DATA::ID => {
33972                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
33973            }
33974            REQUEST_EVENT_DATA::ID => {
33975                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
33976            }
33977            RESOURCE_REQUEST_DATA::ID => {
33978                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
33979            }
33980            RESPONSE_EVENT_ERROR_DATA::ID => {
33981                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
33982            }
33983            SAFETY_ALLOWED_AREA_DATA::ID => {
33984                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
33985            }
33986            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
33987                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
33988                    .map(Self::SAFETY_SET_ALLOWED_AREA)
33989            }
33990            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
33991            SCALED_IMU2_DATA::ID => {
33992                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
33993            }
33994            SCALED_IMU3_DATA::ID => {
33995                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
33996            }
33997            SCALED_PRESSURE_DATA::ID => {
33998                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
33999            }
34000            SCALED_PRESSURE2_DATA::ID => {
34001                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34002            }
34003            SCALED_PRESSURE3_DATA::ID => {
34004                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34005            }
34006            SCRIPT_COUNT_DATA::ID => {
34007                SCRIPT_COUNT_DATA::deser(version, payload).map(Self::SCRIPT_COUNT)
34008            }
34009            SCRIPT_CURRENT_DATA::ID => {
34010                SCRIPT_CURRENT_DATA::deser(version, payload).map(Self::SCRIPT_CURRENT)
34011            }
34012            SCRIPT_ITEM_DATA::ID => {
34013                SCRIPT_ITEM_DATA::deser(version, payload).map(Self::SCRIPT_ITEM)
34014            }
34015            SCRIPT_REQUEST_DATA::ID => {
34016                SCRIPT_REQUEST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST)
34017            }
34018            SCRIPT_REQUEST_LIST_DATA::ID => {
34019                SCRIPT_REQUEST_LIST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST_LIST)
34020            }
34021            SERIAL_CONTROL_DATA::ID => {
34022                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34023            }
34024            SERVO_OUTPUT_RAW_DATA::ID => {
34025                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34026            }
34027            SETUP_SIGNING_DATA::ID => {
34028                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34029            }
34030            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34031                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34032                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34033            }
34034            SET_ATTITUDE_TARGET_DATA::ID => {
34035                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34036            }
34037            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34038                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34039            }
34040            SET_HOME_POSITION_DATA::ID => {
34041                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34042            }
34043            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34044            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34045                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34046                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34047            }
34048            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34049                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34050                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34051            }
34052            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34053            SMART_BATTERY_INFO_DATA::ID => {
34054                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34055            }
34056            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34057            STORAGE_INFORMATION_DATA::ID => {
34058                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34059            }
34060            SUPPORTED_TUNES_DATA::ID => {
34061                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34062            }
34063            SYSTEM_TIME_DATA::ID => {
34064                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34065            }
34066            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34067            TERRAIN_CHECK_DATA::ID => {
34068                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34069            }
34070            TERRAIN_DATA_DATA::ID => {
34071                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34072            }
34073            TERRAIN_REPORT_DATA::ID => {
34074                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34075            }
34076            TERRAIN_REQUEST_DATA::ID => {
34077                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34078            }
34079            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34080            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34081                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34082                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34083            }
34084            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34085                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34086                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34087            }
34088            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34089                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34090                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34091            }
34092            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34093            UAVCAN_NODE_INFO_DATA::ID => {
34094                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34095            }
34096            UAVCAN_NODE_STATUS_DATA::ID => {
34097                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34098            }
34099            UTM_GLOBAL_POSITION_DATA::ID => {
34100                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34101            }
34102            V2_EXTENSION_DATA::ID => {
34103                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34104            }
34105            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34106            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34107            VICON_POSITION_ESTIMATE_DATA::ID => {
34108                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34109                    .map(Self::VICON_POSITION_ESTIMATE)
34110            }
34111            VIDEO_STREAM_INFORMATION_DATA::ID => {
34112                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34113                    .map(Self::VIDEO_STREAM_INFORMATION)
34114            }
34115            VIDEO_STREAM_STATUS_DATA::ID => {
34116                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34117            }
34118            VISION_POSITION_ESTIMATE_DATA::ID => {
34119                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34120                    .map(Self::VISION_POSITION_ESTIMATE)
34121            }
34122            VISION_SPEED_ESTIMATE_DATA::ID => {
34123                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34124            }
34125            WHEEL_DISTANCE_DATA::ID => {
34126                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34127            }
34128            WIFI_CONFIG_AP_DATA::ID => {
34129                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34130            }
34131            WINCH_STATUS_DATA::ID => {
34132                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34133            }
34134            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34135            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34136        }
34137    }
34138    fn message_name(&self) -> &'static str {
34139        match self {
34140            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34141            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34142            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34143            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34144            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34145            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34146            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34147            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34148            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34149            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34150            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34151            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34152                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34153            }
34154            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34155            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34156            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34157            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34158            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34159            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34160            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34161            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34162            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34163            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34164            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34165            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34166            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34167            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34168            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34169            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34170            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34171            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34172            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34173            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34174            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34175            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34176            Self::COLLISION(..) => COLLISION_DATA::NAME,
34177            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34178            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34179            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34180            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34181            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34182            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34183            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34184            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34185            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34186            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34187            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34188            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34189            Self::DEBUG(..) => DEBUG_DATA::NAME,
34190            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34191            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34192            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34193            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34194            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34195            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34196            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34197            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34198            Self::EVENT(..) => EVENT_DATA::NAME,
34199            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34200            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34201            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34202            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34203            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34204            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34205            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34206            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34207            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34208            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34209            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34210            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34211            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34212                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34213            }
34214            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34215            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34216            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34217            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34218            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34219            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34220            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34221            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34222            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34223            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34224            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34225            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34226            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34227            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34228            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34229            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34230            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34231            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34232            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34233            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34234            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34235            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34236            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34237            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34238            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34239            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34240            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34241            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34242            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34243            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34244            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34245            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34246            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34247            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34248            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34249                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34250            }
34251            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34252            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34253            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34254            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34255            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34256            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34257            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34258            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34259            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34260            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34261            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34262            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34263            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34264            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34265            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34266            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34267            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34268            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34269            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34270            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34271            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34272            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34273            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34274            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34275            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34276            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34277            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34278            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34279            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34280            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34281            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34282            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34283            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34284            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34285            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34286            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34287            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34288            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34289            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34290            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34291            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34292            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34293            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34294            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34295            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34296            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34297            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34298            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34299            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34300            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34301            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34302            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34303            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34304            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34305            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34306            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34307            Self::PING(..) => PING_DATA::NAME,
34308            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34309            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34310            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34311            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34312            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34313            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34314            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34315            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34316            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34317            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34318            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34319            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34320            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34321            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34322            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34323            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34324            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34325            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34326            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34327            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34328            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34329            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34330            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34331            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34332            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34333            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34334            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::NAME,
34335            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::NAME,
34336            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::NAME,
34337            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::NAME,
34338            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::NAME,
34339            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34340            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34341            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34342            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34343            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34344            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34345            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34346            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34347            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34348            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34349            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34350            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34351            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34352            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34353            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34354            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34355            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34356            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34357            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34358            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34359            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34360            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34361            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34362            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34363                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34364            }
34365            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34366                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34367            }
34368            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34369            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34370            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34371            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34372            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34373            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34374            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34375            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34376            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34377            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34378            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34379            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34380            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34381            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34382            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34383            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34384        }
34385    }
34386    fn message_id(&self) -> u32 {
34387        match self {
34388            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34389            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34390            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34391            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34392            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34393            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34394            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34395            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34396            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34397            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34398            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34399            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34400                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34401            }
34402            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34403            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34404            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34405            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34406            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34407            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34408            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34409            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34410            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34411            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34412            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34413            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34414            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34415            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34416            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34417            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34418            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34419            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34420            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34421            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34422            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34423            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34424            Self::COLLISION(..) => COLLISION_DATA::ID,
34425            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34426            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34427            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34428            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34429            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34430            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34431            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34432            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34433            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34434            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34435            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34436            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34437            Self::DEBUG(..) => DEBUG_DATA::ID,
34438            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34439            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34440            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34441            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34442            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34443            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34444            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34445            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34446            Self::EVENT(..) => EVENT_DATA::ID,
34447            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34448            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34449            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34450            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34451            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34452            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34453            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34454            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34455            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34456            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34457            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34458            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34459            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34460                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34461            }
34462            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34463            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34464            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34465            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34466            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34467            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34468            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34469            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34470            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34471            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34472            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34473            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34474            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34475            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34476            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34477            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34478            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34479            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34480            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34481            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34482            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34483            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34484            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34485            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34486            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34487            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34488            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34489            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34490            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34491            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34492            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34493            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34494            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34495            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34496            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34497                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34498            }
34499            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34500            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34501            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34502            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34503            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34504            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34505            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34506            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34507            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34508            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34509            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34510            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34511            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34512            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34513            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34514            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34515            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34516            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34517            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34518            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34519            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34520            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34521            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34522            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34523            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34524            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34525            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34526            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34527            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34528            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34529            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34530            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34531            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34532            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34533            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34534            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34535            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34536            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34537            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34538            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34539            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34540            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34541            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34542            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34543            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34544            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34545            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34546            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34547            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34548            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34549            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34550            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34551            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34552            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34553            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34554            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34555            Self::PING(..) => PING_DATA::ID,
34556            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34557            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34558            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34559            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34560            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34561            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34562            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34563            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34564            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34565            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34566            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34567            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34568            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34569            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34570            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34571            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34572            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34573            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34574            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34575            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34576            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34577            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34578            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34579            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34580            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34581            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34582            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::ID,
34583            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::ID,
34584            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::ID,
34585            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::ID,
34586            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::ID,
34587            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34588            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34589            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34590            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34591            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34592            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34593            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34594            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34595            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34596            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34597            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34598            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34599            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34600            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34601            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34602            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34603            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34604            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34605            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34606            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34607            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34608            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34609            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34610            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34611            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34612                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34613            }
34614            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34615            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34616            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34617            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34618            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34619            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34620            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34621            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34622            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34623            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34624            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34625            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34626            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34627            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34628            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34629            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34630        }
34631    }
34632    fn message_id_from_name(name: &str) -> Option<u32> {
34633        match name {
34634            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34635            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34636            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34637            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34638            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34639            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34640            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34641            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34642            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34643            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34644            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34645            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34646                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34647            }
34648            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34649            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34650            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34651            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34652            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34653            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34654            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34655            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34656            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34657            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34658            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34659            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34660            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34661            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34662            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34663            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34664            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34665            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34666            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34667            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34668            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34669            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34670            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34671            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34672            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34673            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34674            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34675            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34676            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34677            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34678            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34679            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34680            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34681            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34682            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34683            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34684            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34685            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34686            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34687            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34688            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34689            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34690            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34691            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34692            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34693            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34694            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34695            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34696            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34697            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34698            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34699            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34700            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34701                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34702            }
34703            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34704            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34705            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34706            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34707            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34708                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34709            }
34710            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34711            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34712            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34713            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34714            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34715                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34716            }
34717            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34718            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34719            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34720            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34721            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34722            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34723            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34724            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34725            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34726            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34727            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34728            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34729            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34730            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34731            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34732            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34733            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34734            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34735            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34736            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34737            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34738            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34739            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34740            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34741            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34742            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34743            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34744            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34745            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34746            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34747                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34748            }
34749            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34750            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34751            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34752            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34753            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34754            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34755            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34756            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34757            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34758            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34759            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34760            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34761            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34762            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34763            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34764            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34765            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34766            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34767            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34768            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34769            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34770            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34771            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34772            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34773            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34774            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34775            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34776            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34777            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34778            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34779            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34780            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34781            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34782            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34783            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34784            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34785            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34786            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34787            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34788            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34789            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34790            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34791            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34792            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34793            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34794            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34795            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34796            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34797            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34798            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34799            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34800            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34801            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34802            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34803            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34804            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34805            PING_DATA::NAME => Some(PING_DATA::ID),
34806            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34807            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34808            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34809            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34810            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34811            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34812            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34813            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34814            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34815            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34816            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34817            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34818            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34819            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34820            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34821            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34822            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34823            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34824            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34825            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34826            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34827            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34828            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34829            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34830            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34831            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34832            SCRIPT_COUNT_DATA::NAME => Some(SCRIPT_COUNT_DATA::ID),
34833            SCRIPT_CURRENT_DATA::NAME => Some(SCRIPT_CURRENT_DATA::ID),
34834            SCRIPT_ITEM_DATA::NAME => Some(SCRIPT_ITEM_DATA::ID),
34835            SCRIPT_REQUEST_DATA::NAME => Some(SCRIPT_REQUEST_DATA::ID),
34836            SCRIPT_REQUEST_LIST_DATA::NAME => Some(SCRIPT_REQUEST_LIST_DATA::ID),
34837            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34838            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34839            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34840            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34841            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34842            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34843            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34844            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34845            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34846                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34847            }
34848            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34849                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34850            }
34851            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34852            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34853            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34854            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34855            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34856            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34857            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34858            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34859            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34860            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34861            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34862            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34863            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34864            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34865                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34866            }
34867            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34868                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34869            }
34870            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34871            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34872            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34873            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34874            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34875            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34876            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34877            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34878            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34879            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34880            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34881            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34882            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34883            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34884            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34885            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34886            _ => None,
34887        }
34888    }
34889    fn default_message_from_id(id: u32) -> Option<Self> {
34890        match id {
34891            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34892                ACTUATOR_CONTROL_TARGET_DATA::default(),
34893            )),
34894            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34895                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34896            )),
34897            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34898            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34899            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34900            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34901            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34902                ATTITUDE_QUATERNION_DATA::default(),
34903            )),
34904            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34905                ATTITUDE_QUATERNION_COV_DATA::default(),
34906            )),
34907            ATTITUDE_TARGET_DATA::ID => {
34908                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34909            }
34910            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34911            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34912            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34913                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34914                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34915                ))
34916            }
34917            AUTOPILOT_VERSION_DATA::ID => {
34918                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34919            }
34920            AVAILABLE_MODES_DATA::ID => {
34921                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34922            }
34923            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34924                AVAILABLE_MODES_MONITOR_DATA::default(),
34925            )),
34926            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34927            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34928            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34929            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34930                CAMERA_CAPTURE_STATUS_DATA::default(),
34931            )),
34932            CAMERA_FOV_STATUS_DATA::ID => {
34933                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34934            }
34935            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34936                CAMERA_IMAGE_CAPTURED_DATA::default(),
34937            )),
34938            CAMERA_INFORMATION_DATA::ID => {
34939                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34940            }
34941            CAMERA_SETTINGS_DATA::ID => {
34942                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
34943            }
34944            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34945                CAMERA_THERMAL_RANGE_DATA::default(),
34946            )),
34947            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34948                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
34949            )),
34950            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34951                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
34952            )),
34953            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
34954            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
34955            CAN_FILTER_MODIFY_DATA::ID => {
34956                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
34957            }
34958            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
34959            CELLULAR_CONFIG_DATA::ID => {
34960                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
34961            }
34962            CELLULAR_STATUS_DATA::ID => {
34963                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
34964            }
34965            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34966                CHANGE_OPERATOR_CONTROL_DATA::default(),
34967            )),
34968            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34969                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
34970            )),
34971            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
34972            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
34973            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
34974            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
34975            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
34976            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34977                COMPONENT_INFORMATION_DATA::default(),
34978            )),
34979            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34980                COMPONENT_INFORMATION_BASIC_DATA::default(),
34981            )),
34982            COMPONENT_METADATA_DATA::ID => {
34983                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
34984            }
34985            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34986                CONTROL_SYSTEM_STATE_DATA::default(),
34987            )),
34988            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34989                CURRENT_EVENT_SEQUENCE_DATA::default(),
34990            )),
34991            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
34992            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
34993            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34994                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
34995            )),
34996            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
34997            DEBUG_FLOAT_ARRAY_DATA::ID => {
34998                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
34999            }
35000            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35001            DISTANCE_SENSOR_DATA::ID => {
35002                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35003            }
35004            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35005            ENCAPSULATED_DATA_DATA::ID => {
35006                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35007            }
35008            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35009            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35010            ESTIMATOR_STATUS_DATA::ID => {
35011                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35012            }
35013            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35014            EXTENDED_SYS_STATE_DATA::ID => {
35015                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35016            }
35017            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35018            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35019                FILE_TRANSFER_PROTOCOL_DATA::default(),
35020            )),
35021            FLIGHT_INFORMATION_DATA::ID => {
35022                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35023            }
35024            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35025            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35026            GENERATOR_STATUS_DATA::ID => {
35027                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35028            }
35029            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35030                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35031            )),
35032            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35033                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35034            )),
35035            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35036                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35037            )),
35038            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35039                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35040            )),
35041            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35042                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35043            )),
35044            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35045                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35046                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35047                ))
35048            }
35049            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35050                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35051            )),
35052            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35053                GIMBAL_MANAGER_STATUS_DATA::default(),
35054            )),
35055            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35056                GLOBAL_POSITION_INT_DATA::default(),
35057            )),
35058            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35059                GLOBAL_POSITION_INT_COV_DATA::default(),
35060            )),
35061            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35062                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35063                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35064                ))
35065            }
35066            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35067            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35068            GPS_GLOBAL_ORIGIN_DATA::ID => {
35069                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35070            }
35071            GPS_INJECT_DATA_DATA::ID => {
35072                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35073            }
35074            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35075            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35076            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35077            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35078            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35079            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35080            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35081            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35082            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35083            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35084                HIL_ACTUATOR_CONTROLS_DATA::default(),
35085            )),
35086            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35087            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35088            HIL_OPTICAL_FLOW_DATA::ID => {
35089                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35090            }
35091            HIL_RC_INPUTS_RAW_DATA::ID => {
35092                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35093            }
35094            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35095            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35096            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35097                HIL_STATE_QUATERNION_DATA::default(),
35098            )),
35099            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35100            HYGROMETER_SENSOR_DATA::ID => {
35101                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35102            }
35103            ILLUMINATOR_STATUS_DATA::ID => {
35104                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35105            }
35106            ISBD_LINK_STATUS_DATA::ID => {
35107                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35108            }
35109            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35110            LINK_NODE_STATUS_DATA::ID => {
35111                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35112            }
35113            LOCAL_POSITION_NED_DATA::ID => {
35114                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35115            }
35116            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35117                LOCAL_POSITION_NED_COV_DATA::default(),
35118            )),
35119            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35120                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35121                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35122                ))
35123            }
35124            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35125            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35126            LOGGING_DATA_ACKED_DATA::ID => {
35127                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35128            }
35129            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35130            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35131            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35132            LOG_REQUEST_DATA_DATA::ID => {
35133                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35134            }
35135            LOG_REQUEST_END_DATA::ID => {
35136                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35137            }
35138            LOG_REQUEST_LIST_DATA::ID => {
35139                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35140            }
35141            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35142            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35143            MANUAL_SETPOINT_DATA::ID => {
35144                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35145            }
35146            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35147            MESSAGE_INTERVAL_DATA::ID => {
35148                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35149            }
35150            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35151            MISSION_CLEAR_ALL_DATA::ID => {
35152                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35153            }
35154            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35155            MISSION_CURRENT_DATA::ID => {
35156                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35157            }
35158            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35159            MISSION_ITEM_INT_DATA::ID => {
35160                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35161            }
35162            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35163                MISSION_ITEM_REACHED_DATA::default(),
35164            )),
35165            MISSION_REQUEST_DATA::ID => {
35166                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35167            }
35168            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35169                MISSION_REQUEST_INT_DATA::default(),
35170            )),
35171            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35172                MISSION_REQUEST_LIST_DATA::default(),
35173            )),
35174            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35175                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35176            )),
35177            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35178                MISSION_SET_CURRENT_DATA::default(),
35179            )),
35180            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35181                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35182            )),
35183            MOUNT_ORIENTATION_DATA::ID => {
35184                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35185            }
35186            NAMED_VALUE_FLOAT_DATA::ID => {
35187                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35188            }
35189            NAMED_VALUE_INT_DATA::ID => {
35190                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35191            }
35192            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35193                NAV_CONTROLLER_OUTPUT_DATA::default(),
35194            )),
35195            OBSTACLE_DISTANCE_DATA::ID => {
35196                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35197            }
35198            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35199            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35200                ONBOARD_COMPUTER_STATUS_DATA::default(),
35201            )),
35202            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35203                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35204            )),
35205            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35206                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35207            )),
35208            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35209                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35210            )),
35211            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35212                OPEN_DRONE_ID_LOCATION_DATA::default(),
35213            )),
35214            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35215                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35216            )),
35217            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35218                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35219            )),
35220            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35221                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35222            )),
35223            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35224                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35225            )),
35226            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35227                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35228            )),
35229            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35230            OPTICAL_FLOW_RAD_DATA::ID => {
35231                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35232            }
35233            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35234                ORBIT_EXECUTION_STATUS_DATA::default(),
35235            )),
35236            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35237            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35238                PARAM_EXT_REQUEST_LIST_DATA::default(),
35239            )),
35240            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35241                PARAM_EXT_REQUEST_READ_DATA::default(),
35242            )),
35243            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35244            PARAM_EXT_VALUE_DATA::ID => {
35245                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35246            }
35247            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35248            PARAM_REQUEST_LIST_DATA::ID => {
35249                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35250            }
35251            PARAM_REQUEST_READ_DATA::ID => {
35252                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35253            }
35254            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35255            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35256            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35257            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35258            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35259            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35260                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35261            )),
35262            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35263                POSITION_TARGET_LOCAL_NED_DATA::default(),
35264            )),
35265            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35266            PROTOCOL_VERSION_DATA::ID => {
35267                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35268            }
35269            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35270            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35271            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35272            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35273            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35274            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35275                RC_CHANNELS_OVERRIDE_DATA::default(),
35276            )),
35277            RC_CHANNELS_RAW_DATA::ID => {
35278                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35279            }
35280            RC_CHANNELS_SCALED_DATA::ID => {
35281                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35282            }
35283            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35284                REQUEST_DATA_STREAM_DATA::default(),
35285            )),
35286            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35287            RESOURCE_REQUEST_DATA::ID => {
35288                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35289            }
35290            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35291                RESPONSE_EVENT_ERROR_DATA::default(),
35292            )),
35293            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35294                SAFETY_ALLOWED_AREA_DATA::default(),
35295            )),
35296            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35297                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35298            )),
35299            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35300            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35301            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35302            SCALED_PRESSURE_DATA::ID => {
35303                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35304            }
35305            SCALED_PRESSURE2_DATA::ID => {
35306                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35307            }
35308            SCALED_PRESSURE3_DATA::ID => {
35309                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35310            }
35311            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::default())),
35312            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::default())),
35313            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::default())),
35314            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::default())),
35315            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35316                SCRIPT_REQUEST_LIST_DATA::default(),
35317            )),
35318            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35319            SERVO_OUTPUT_RAW_DATA::ID => {
35320                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35321            }
35322            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35323            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35324                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35325            )),
35326            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35327                SET_ATTITUDE_TARGET_DATA::default(),
35328            )),
35329            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35330                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35331            )),
35332            SET_HOME_POSITION_DATA::ID => {
35333                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35334            }
35335            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35336            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35337                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35338            )),
35339            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35340                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35341            )),
35342            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35343            SMART_BATTERY_INFO_DATA::ID => {
35344                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35345            }
35346            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35347            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35348                STORAGE_INFORMATION_DATA::default(),
35349            )),
35350            SUPPORTED_TUNES_DATA::ID => {
35351                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35352            }
35353            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35354            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35355            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35356            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35357            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35358            TERRAIN_REQUEST_DATA::ID => {
35359                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35360            }
35361            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35362            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35363                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35364            )),
35365            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35366                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35367                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35368                ))
35369            }
35370            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35371                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35372                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35373                ))
35374            }
35375            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35376            UAVCAN_NODE_INFO_DATA::ID => {
35377                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35378            }
35379            UAVCAN_NODE_STATUS_DATA::ID => {
35380                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35381            }
35382            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35383                UTM_GLOBAL_POSITION_DATA::default(),
35384            )),
35385            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35386            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35387            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35388            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35389                VICON_POSITION_ESTIMATE_DATA::default(),
35390            )),
35391            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35392                VIDEO_STREAM_INFORMATION_DATA::default(),
35393            )),
35394            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35395                VIDEO_STREAM_STATUS_DATA::default(),
35396            )),
35397            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35398                VISION_POSITION_ESTIMATE_DATA::default(),
35399            )),
35400            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35401                VISION_SPEED_ESTIMATE_DATA::default(),
35402            )),
35403            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35404            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35405            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35406            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35407            _ => None,
35408        }
35409    }
35410    #[cfg(feature = "arbitrary")]
35411    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35412        match id {
35413            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35414                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35415            )),
35416            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35417                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35418            )),
35419            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35420            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35421            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35422            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35423            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35424                ATTITUDE_QUATERNION_DATA::random(rng),
35425            )),
35426            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35427                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35428            )),
35429            ATTITUDE_TARGET_DATA::ID => {
35430                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35431            }
35432            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35433            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35434            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35435                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35436                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35437                ))
35438            }
35439            AUTOPILOT_VERSION_DATA::ID => {
35440                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35441            }
35442            AVAILABLE_MODES_DATA::ID => {
35443                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35444            }
35445            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35446                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35447            )),
35448            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35449            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35450            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35451            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35452                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35453            )),
35454            CAMERA_FOV_STATUS_DATA::ID => {
35455                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35456            }
35457            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35458                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35459            )),
35460            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35461                CAMERA_INFORMATION_DATA::random(rng),
35462            )),
35463            CAMERA_SETTINGS_DATA::ID => {
35464                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35465            }
35466            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35467                CAMERA_THERMAL_RANGE_DATA::random(rng),
35468            )),
35469            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35470                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35471            )),
35472            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35473                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35474            )),
35475            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35476            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35477            CAN_FILTER_MODIFY_DATA::ID => {
35478                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35479            }
35480            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35481            CELLULAR_CONFIG_DATA::ID => {
35482                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35483            }
35484            CELLULAR_STATUS_DATA::ID => {
35485                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35486            }
35487            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35488                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35489            )),
35490            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35491                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35492            )),
35493            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35494            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35495            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35496            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35497            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35498            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35499                COMPONENT_INFORMATION_DATA::random(rng),
35500            )),
35501            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35502                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35503            )),
35504            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35505                COMPONENT_METADATA_DATA::random(rng),
35506            )),
35507            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35508                CONTROL_SYSTEM_STATE_DATA::random(rng),
35509            )),
35510            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35511                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35512            )),
35513            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35514            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35515            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35516                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35517            )),
35518            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35519            DEBUG_FLOAT_ARRAY_DATA::ID => {
35520                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35521            }
35522            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35523            DISTANCE_SENSOR_DATA::ID => {
35524                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35525            }
35526            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35527            ENCAPSULATED_DATA_DATA::ID => {
35528                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35529            }
35530            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35531            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35532            ESTIMATOR_STATUS_DATA::ID => {
35533                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35534            }
35535            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35536            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35537                EXTENDED_SYS_STATE_DATA::random(rng),
35538            )),
35539            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35540            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35541                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35542            )),
35543            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35544                FLIGHT_INFORMATION_DATA::random(rng),
35545            )),
35546            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35547            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35548            GENERATOR_STATUS_DATA::ID => {
35549                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35550            }
35551            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35552                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35553            )),
35554            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35555                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35556            )),
35557            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35558                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35559            )),
35560            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35561                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35562            )),
35563            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35564                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35565            )),
35566            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35567                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35568                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35569                ))
35570            }
35571            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35572                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35573            )),
35574            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35575                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35576            )),
35577            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35578                GLOBAL_POSITION_INT_DATA::random(rng),
35579            )),
35580            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35581                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35582            )),
35583            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35584                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35585                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35586                ))
35587            }
35588            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35589            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35590            GPS_GLOBAL_ORIGIN_DATA::ID => {
35591                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35592            }
35593            GPS_INJECT_DATA_DATA::ID => {
35594                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35595            }
35596            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35597            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35598            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35599            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35600            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35601            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35602            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35603            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35604            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35605            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35606                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35607            )),
35608            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35609            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35610            HIL_OPTICAL_FLOW_DATA::ID => {
35611                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35612            }
35613            HIL_RC_INPUTS_RAW_DATA::ID => {
35614                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35615            }
35616            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35617            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35618            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35619                HIL_STATE_QUATERNION_DATA::random(rng),
35620            )),
35621            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35622            HYGROMETER_SENSOR_DATA::ID => {
35623                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35624            }
35625            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35626                ILLUMINATOR_STATUS_DATA::random(rng),
35627            )),
35628            ISBD_LINK_STATUS_DATA::ID => {
35629                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35630            }
35631            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35632            LINK_NODE_STATUS_DATA::ID => {
35633                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35634            }
35635            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35636                LOCAL_POSITION_NED_DATA::random(rng),
35637            )),
35638            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35639                LOCAL_POSITION_NED_COV_DATA::random(rng),
35640            )),
35641            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35642                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35643                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35644                ))
35645            }
35646            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35647            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35648            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35649                LOGGING_DATA_ACKED_DATA::random(rng),
35650            )),
35651            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35652            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35653            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35654            LOG_REQUEST_DATA_DATA::ID => {
35655                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35656            }
35657            LOG_REQUEST_END_DATA::ID => {
35658                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35659            }
35660            LOG_REQUEST_LIST_DATA::ID => {
35661                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35662            }
35663            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35664            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35665            MANUAL_SETPOINT_DATA::ID => {
35666                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35667            }
35668            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35669            MESSAGE_INTERVAL_DATA::ID => {
35670                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35671            }
35672            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35673            MISSION_CLEAR_ALL_DATA::ID => {
35674                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35675            }
35676            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35677            MISSION_CURRENT_DATA::ID => {
35678                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35679            }
35680            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35681            MISSION_ITEM_INT_DATA::ID => {
35682                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35683            }
35684            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35685                MISSION_ITEM_REACHED_DATA::random(rng),
35686            )),
35687            MISSION_REQUEST_DATA::ID => {
35688                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35689            }
35690            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35691                MISSION_REQUEST_INT_DATA::random(rng),
35692            )),
35693            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35694                MISSION_REQUEST_LIST_DATA::random(rng),
35695            )),
35696            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35697                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35698            )),
35699            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35700                MISSION_SET_CURRENT_DATA::random(rng),
35701            )),
35702            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35703                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35704            )),
35705            MOUNT_ORIENTATION_DATA::ID => {
35706                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35707            }
35708            NAMED_VALUE_FLOAT_DATA::ID => {
35709                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35710            }
35711            NAMED_VALUE_INT_DATA::ID => {
35712                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35713            }
35714            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35715                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35716            )),
35717            OBSTACLE_DISTANCE_DATA::ID => {
35718                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35719            }
35720            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35721            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35722                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35723            )),
35724            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35725                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35726            )),
35727            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35728                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35729            )),
35730            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35731                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35732            )),
35733            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35734                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35735            )),
35736            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35737                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35738            )),
35739            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35740                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35741            )),
35742            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35743                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35744            )),
35745            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35746                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35747            )),
35748            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35749                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35750            )),
35751            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35752            OPTICAL_FLOW_RAD_DATA::ID => {
35753                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35754            }
35755            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35756                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35757            )),
35758            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35759            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35760                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35761            )),
35762            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35763                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35764            )),
35765            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35766            PARAM_EXT_VALUE_DATA::ID => {
35767                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35768            }
35769            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35770            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35771                PARAM_REQUEST_LIST_DATA::random(rng),
35772            )),
35773            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35774                PARAM_REQUEST_READ_DATA::random(rng),
35775            )),
35776            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35777            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35778            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35779            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35780            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35781            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35782                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35783            )),
35784            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35785                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35786            )),
35787            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35788            PROTOCOL_VERSION_DATA::ID => {
35789                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35790            }
35791            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35792            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35793            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35794            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35795            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35796            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35797                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35798            )),
35799            RC_CHANNELS_RAW_DATA::ID => {
35800                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35801            }
35802            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35803                RC_CHANNELS_SCALED_DATA::random(rng),
35804            )),
35805            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35806                REQUEST_DATA_STREAM_DATA::random(rng),
35807            )),
35808            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35809            RESOURCE_REQUEST_DATA::ID => {
35810                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35811            }
35812            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35813                RESPONSE_EVENT_ERROR_DATA::random(rng),
35814            )),
35815            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35816                SAFETY_ALLOWED_AREA_DATA::random(rng),
35817            )),
35818            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35819                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35820            )),
35821            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35822            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35823            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35824            SCALED_PRESSURE_DATA::ID => {
35825                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35826            }
35827            SCALED_PRESSURE2_DATA::ID => {
35828                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35829            }
35830            SCALED_PRESSURE3_DATA::ID => {
35831                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35832            }
35833            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::random(rng))),
35834            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::random(rng))),
35835            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::random(rng))),
35836            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::random(rng))),
35837            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35838                SCRIPT_REQUEST_LIST_DATA::random(rng),
35839            )),
35840            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35841            SERVO_OUTPUT_RAW_DATA::ID => {
35842                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35843            }
35844            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35845            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35846                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35847            )),
35848            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35849                SET_ATTITUDE_TARGET_DATA::random(rng),
35850            )),
35851            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35852                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35853            )),
35854            SET_HOME_POSITION_DATA::ID => {
35855                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35856            }
35857            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35858            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35859                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35860            )),
35861            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35862                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35863            )),
35864            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35865            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35866                SMART_BATTERY_INFO_DATA::random(rng),
35867            )),
35868            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35869            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35870                STORAGE_INFORMATION_DATA::random(rng),
35871            )),
35872            SUPPORTED_TUNES_DATA::ID => {
35873                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35874            }
35875            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35876            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35877            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35878            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35879            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35880            TERRAIN_REQUEST_DATA::ID => {
35881                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35882            }
35883            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35884            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35885                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35886            )),
35887            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35888                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35889                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35890                ))
35891            }
35892            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35893                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35894                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35895                ))
35896            }
35897            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35898            UAVCAN_NODE_INFO_DATA::ID => {
35899                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35900            }
35901            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35902                UAVCAN_NODE_STATUS_DATA::random(rng),
35903            )),
35904            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35905                UTM_GLOBAL_POSITION_DATA::random(rng),
35906            )),
35907            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35908            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35909            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35910            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35911                VICON_POSITION_ESTIMATE_DATA::random(rng),
35912            )),
35913            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35914                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35915            )),
35916            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35917                VIDEO_STREAM_STATUS_DATA::random(rng),
35918            )),
35919            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35920                VISION_POSITION_ESTIMATE_DATA::random(rng),
35921            )),
35922            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35923                VISION_SPEED_ESTIMATE_DATA::random(rng),
35924            )),
35925            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
35926            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
35927            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
35928            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
35929            _ => None,
35930        }
35931    }
35932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35933        match self {
35934            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
35935            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
35936            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
35937            Self::AIS_VESSEL(body) => body.ser(version, bytes),
35938            Self::ALTITUDE(body) => body.ser(version, bytes),
35939            Self::ATTITUDE(body) => body.ser(version, bytes),
35940            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
35941            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
35942            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
35943            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
35944            Self::AUTH_KEY(body) => body.ser(version, bytes),
35945            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
35946            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
35947            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
35948            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
35949            Self::BATTERY_INFO(body) => body.ser(version, bytes),
35950            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
35951            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
35952            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
35953            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
35954            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
35955            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
35956            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
35957            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
35958            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
35959            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
35960            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
35961            Self::CANFD_FRAME(body) => body.ser(version, bytes),
35962            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
35963            Self::CAN_FRAME(body) => body.ser(version, bytes),
35964            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
35965            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
35966            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
35967            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
35968            Self::COLLISION(body) => body.ser(version, bytes),
35969            Self::COMMAND_ACK(body) => body.ser(version, bytes),
35970            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
35971            Self::COMMAND_INT(body) => body.ser(version, bytes),
35972            Self::COMMAND_LONG(body) => body.ser(version, bytes),
35973            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
35974            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
35975            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
35976            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
35977            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
35978            Self::CURRENT_MODE(body) => body.ser(version, bytes),
35979            Self::DATA_STREAM(body) => body.ser(version, bytes),
35980            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
35981            Self::DEBUG(body) => body.ser(version, bytes),
35982            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
35983            Self::DEBUG_VECT(body) => body.ser(version, bytes),
35984            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
35985            Self::EFI_STATUS(body) => body.ser(version, bytes),
35986            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
35987            Self::ESC_INFO(body) => body.ser(version, bytes),
35988            Self::ESC_STATUS(body) => body.ser(version, bytes),
35989            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
35990            Self::EVENT(body) => body.ser(version, bytes),
35991            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
35992            Self::FENCE_STATUS(body) => body.ser(version, bytes),
35993            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
35994            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
35995            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
35996            Self::FUEL_STATUS(body) => body.ser(version, bytes),
35997            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
35998            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
35999            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36000            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36001            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36002            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36003            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36004            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36005            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36006            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36007            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36008            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36009            Self::GPS2_RAW(body) => body.ser(version, bytes),
36010            Self::GPS2_RTK(body) => body.ser(version, bytes),
36011            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36012            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36013            Self::GPS_INPUT(body) => body.ser(version, bytes),
36014            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36015            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36016            Self::GPS_RTK(body) => body.ser(version, bytes),
36017            Self::GPS_STATUS(body) => body.ser(version, bytes),
36018            Self::HEARTBEAT(body) => body.ser(version, bytes),
36019            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36020            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36021            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36022            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36023            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36024            Self::HIL_GPS(body) => body.ser(version, bytes),
36025            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36026            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36027            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36028            Self::HIL_STATE(body) => body.ser(version, bytes),
36029            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36030            Self::HOME_POSITION(body) => body.ser(version, bytes),
36031            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36032            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36033            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36034            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36035            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36036            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36037            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36038            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36039            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36040            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36041            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36042            Self::LOG_DATA(body) => body.ser(version, bytes),
36043            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36044            Self::LOG_ERASE(body) => body.ser(version, bytes),
36045            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36046            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36047            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36048            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36049            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36050            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36051            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36052            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36053            Self::MISSION_ACK(body) => body.ser(version, bytes),
36054            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36055            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36056            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36057            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36058            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36059            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36060            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36061            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36062            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36063            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36064            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36065            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36066            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36067            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36068            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36069            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36070            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36071            Self::ODOMETRY(body) => body.ser(version, bytes),
36072            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36073            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36074            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36075            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36076            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36077            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36078            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36079            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36080            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36081            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36082            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36083            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36084            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36085            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36086            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36087            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36088            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36089            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36090            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36091            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36092            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36093            Self::PARAM_SET(body) => body.ser(version, bytes),
36094            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36095            Self::PING(body) => body.ser(version, bytes),
36096            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36097            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36098            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36099            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36100            Self::POWER_STATUS(body) => body.ser(version, bytes),
36101            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36102            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36103            Self::RAW_IMU(body) => body.ser(version, bytes),
36104            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36105            Self::RAW_RPM(body) => body.ser(version, bytes),
36106            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36107            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36108            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36109            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36110            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36111            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36112            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36113            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36114            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36115            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36116            Self::SCALED_IMU(body) => body.ser(version, bytes),
36117            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36118            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36119            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36120            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36121            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36122            Self::SCRIPT_COUNT(body) => body.ser(version, bytes),
36123            Self::SCRIPT_CURRENT(body) => body.ser(version, bytes),
36124            Self::SCRIPT_ITEM(body) => body.ser(version, bytes),
36125            Self::SCRIPT_REQUEST(body) => body.ser(version, bytes),
36126            Self::SCRIPT_REQUEST_LIST(body) => body.ser(version, bytes),
36127            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36128            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36129            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36130            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36131            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36132            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36133            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36134            Self::SET_MODE(body) => body.ser(version, bytes),
36135            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36136            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36137            Self::SIM_STATE(body) => body.ser(version, bytes),
36138            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36139            Self::STATUSTEXT(body) => body.ser(version, bytes),
36140            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36141            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36142            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36143            Self::SYS_STATUS(body) => body.ser(version, bytes),
36144            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36145            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36146            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36147            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36148            Self::TIMESYNC(body) => body.ser(version, bytes),
36149            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36150            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36151            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36152            Self::TUNNEL(body) => body.ser(version, bytes),
36153            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36154            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36155            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36156            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36157            Self::VFR_HUD(body) => body.ser(version, bytes),
36158            Self::VIBRATION(body) => body.ser(version, bytes),
36159            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36160            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36161            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36162            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36163            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36164            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36165            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36166            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36167            Self::WIND_COV(body) => body.ser(version, bytes),
36168        }
36169    }
36170    fn extra_crc(id: u32) -> u8 {
36171        match id {
36172            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36173            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36174            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36175            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36176            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36177            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36178            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36179            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36180            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36181            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36182            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36183            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36184                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36185            }
36186            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36187            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36188            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36189            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36190            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36191            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36192            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36193            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36194            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36195            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36196            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36197            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36198            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36199            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36200            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36201            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36202            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36203            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36204            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36205            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36206            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36207            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36208            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36209            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36210            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36211            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36212            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36213            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36214            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36215            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36216            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36217            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36218            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36219            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36220            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36221            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36222            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36223            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36224            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36225            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36226            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36227            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36228            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36229            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36230            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36231            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36232            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36233            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36234            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36235            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36236            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36237            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36238            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36239            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36240            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36241            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36242            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36243            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36244                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36245            }
36246            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36247            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36248            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36249            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36250            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36251                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36252            }
36253            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36254            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36255            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36256            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36257            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36258            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36259            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36260            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36261            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36262            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36263            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36264            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36265            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36266            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36267            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36268            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36269            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36270            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36271            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36272            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36273            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36274            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36275            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36276            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36277            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36278            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36279            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36280            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36281            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36282            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36283                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36284            }
36285            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36286            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36287            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36288            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36289            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36290            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36291            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36292            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36293            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36294            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36295            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36296            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36297            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36298            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36299            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36300            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36301            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36302            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36303            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36304            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36305            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36306            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36307            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36308            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36309            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36310            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36311            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36312            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36313            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36314            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36315            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36316            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36317            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36318            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36319            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36320            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36321            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36322            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36323            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36324            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36325            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36326            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36327            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36328            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36329            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36330            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36331            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36332            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36333            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36334            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36335            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36336            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36337            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36338            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36339            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36340            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36341            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36342            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36343            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36344            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36345            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36346            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36347            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36348            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36349            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36350            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36351            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36352            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36353            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36354            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36355            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36356            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36357            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36358            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36359            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36360            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36361            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36362            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36363            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36364            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36365            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36366            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36367            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36368            SCRIPT_COUNT_DATA::ID => SCRIPT_COUNT_DATA::EXTRA_CRC,
36369            SCRIPT_CURRENT_DATA::ID => SCRIPT_CURRENT_DATA::EXTRA_CRC,
36370            SCRIPT_ITEM_DATA::ID => SCRIPT_ITEM_DATA::EXTRA_CRC,
36371            SCRIPT_REQUEST_DATA::ID => SCRIPT_REQUEST_DATA::EXTRA_CRC,
36372            SCRIPT_REQUEST_LIST_DATA::ID => SCRIPT_REQUEST_LIST_DATA::EXTRA_CRC,
36373            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36374            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36375            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36376            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36377            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36378            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36379            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36380            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36381            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36382                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36383            }
36384            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36385            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36386            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36387            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36388            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36389            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36390            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36391            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36392            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36393            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36394            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36395            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36396            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36397            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36398            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36399                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36400            }
36401            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36402                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36403            }
36404            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36405            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36406            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36407            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36408            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36409            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36410            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36411            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36412            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36413            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36414            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36415            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36416            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36417            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36418            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36419            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36420            _ => 0,
36421        }
36422    }
36423    fn target_system_id(&self) -> Option<u8> {
36424        match self {
36425            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36426            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36427            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36428            Self::CAN_FRAME(inner) => Some(inner.target_system),
36429            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36430            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36431            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36432            Self::COMMAND_INT(inner) => Some(inner.target_system),
36433            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36434            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36435            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36436            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36437            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36438            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36439            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36440            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36441            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36442            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36443            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36444            Self::LOG_ERASE(inner) => Some(inner.target_system),
36445            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36446            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36447            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36448            Self::MISSION_ACK(inner) => Some(inner.target_system),
36449            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36450            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36451            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36452            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36453            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36454            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36455            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36456            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36457            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36458            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36459            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36460            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36461            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36462            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36463            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36464            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36465            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36466            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36467            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36468            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36469            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36470            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36471            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36472            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36473            Self::PARAM_SET(inner) => Some(inner.target_system),
36474            Self::PING(inner) => Some(inner.target_system),
36475            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36476            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36477            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36478            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36479            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36480            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36481            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36482            Self::SCRIPT_COUNT(inner) => Some(inner.target_system),
36483            Self::SCRIPT_ITEM(inner) => Some(inner.target_system),
36484            Self::SCRIPT_REQUEST(inner) => Some(inner.target_system),
36485            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_system),
36486            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36487            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36488            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36489            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36490            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36491            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36492            Self::SET_MODE(inner) => Some(inner.target_system),
36493            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36494            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36495            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36496            Self::TIMESYNC(inner) => Some(inner.target_system),
36497            Self::TUNNEL(inner) => Some(inner.target_system),
36498            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36499            _ => None,
36500        }
36501    }
36502    fn target_component_id(&self) -> Option<u8> {
36503        match self {
36504            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36505            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36506            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36507            Self::CAN_FRAME(inner) => Some(inner.target_component),
36508            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36509            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36510            Self::COMMAND_INT(inner) => Some(inner.target_component),
36511            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36512            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36513            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36514            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36515            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36516            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36517            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36518            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36519            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36520            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36521            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36522            Self::LOG_ERASE(inner) => Some(inner.target_component),
36523            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36524            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36525            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36526            Self::MISSION_ACK(inner) => Some(inner.target_component),
36527            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36528            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36529            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36530            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36531            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36532            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36533            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36534            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36535            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36536            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36537            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36538            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36539            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36540            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36541            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36542            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36543            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36544            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36545            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36546            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36547            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36548            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36549            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36550            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36551            Self::PARAM_SET(inner) => Some(inner.target_component),
36552            Self::PING(inner) => Some(inner.target_component),
36553            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36554            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36555            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36556            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36557            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36558            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36559            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36560            Self::SCRIPT_COUNT(inner) => Some(inner.target_component),
36561            Self::SCRIPT_ITEM(inner) => Some(inner.target_component),
36562            Self::SCRIPT_REQUEST(inner) => Some(inner.target_component),
36563            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_component),
36564            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36565            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36566            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36567            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36568            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36569            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36570            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36571            Self::TIMESYNC(inner) => Some(inner.target_component),
36572            Self::TUNNEL(inner) => Some(inner.target_component),
36573            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36574            _ => None,
36575        }
36576    }
36577}